mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-23 18:11:37 +08:00
feat: add rss engine
This commit is contained in:
@@ -95,3 +95,12 @@ class RequestContent(RequestURL):
|
||||
|
||||
def check_connection(self, _url):
|
||||
return self.check_url(_url)
|
||||
|
||||
def get_rss_title(self, _url):
|
||||
soup = self.get_xml(_url)
|
||||
return soup.find("title").text
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
with RequestContent() as req:
|
||||
req.get_xml("https://mikanani.me/RSS/Classic")
|
||||
|
||||
@@ -7,3 +7,7 @@ def mikan_parser(soup):
|
||||
torrent_urls.append(item.find("enclosure").attrib["url"])
|
||||
torrent_homepage.append(item.find("link").text)
|
||||
return torrent_titles, torrent_urls, torrent_homepage
|
||||
|
||||
|
||||
def mikan_title(soup):
|
||||
return soup.find("title").text
|
||||
|
||||
Reference in New Issue
Block a user