mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-05-03 18:35:04 +08:00
15 lines
465 B
Python
15 lines
465 B
Python
from module.conf import settings
|
|
from module.network import RequestContent
|
|
|
|
|
|
class RSSSearcher(RequestContent):
|
|
def __search_url(self, keywords: str) -> str:
|
|
keywords.replace(" ", "+")
|
|
url = f"{settings.rss_parser.custom_url}/RSS/Search?keyword={keywords}"
|
|
return url
|
|
|
|
def search_keywords(self, keywords: str) -> list[dict]:
|
|
url = self.__search_url(keywords)
|
|
torrents = self.get_torrents(url)
|
|
return torrents
|