fix cython type error

This commit is contained in:
jxxghp
2025-03-23 21:39:37 +08:00
parent 740cf12c11
commit f9b0db623d
113 changed files with 812 additions and 779 deletions

View File

@@ -47,7 +47,7 @@ class SiteParserBase(metaclass=ABCMeta):
apikey: str,
token: str,
session: Session = None,
ua: str = None,
ua: Optional[str] = None,
emulate: bool = False,
proxy: bool = None):
super().__init__()

View File

@@ -74,7 +74,7 @@ class FileListSiteUserInfo(SiteParserBase):
self.bonus = StringUtils.str_float(bonus_html[0].xpath("string(.)").strip())
pass
def _parse_user_torrent_seeding_info(self, html_text: str, multi_page: bool = False) -> Optional[str]:
def _parse_user_torrent_seeding_info(self, html_text: str, multi_page: Optional[bool] = False) -> Optional[str]:
"""
做种相关信息
:param html_text:

View File

@@ -87,7 +87,7 @@ class GazelleSiteUserInfo(SiteParserBase):
if join_at_text:
self.join_at = StringUtils.unify_datetime_str(join_at_text[0].strip())
def _parse_user_torrent_seeding_info(self, html_text: str, multi_page: bool = False) -> Optional[str]:
def _parse_user_torrent_seeding_info(self, html_text: str, multi_page: Optional[bool] = False) -> Optional[str]:
"""
做种相关信息
:param html_text:

View File

@@ -121,7 +121,7 @@ class HDDolbySiteUserInfo(SiteParserBase):
"""
pass
def _parse_user_torrent_seeding_info(self, html_text: str, multi_page: bool = False) -> Optional[str]:
def _parse_user_torrent_seeding_info(self, html_text: str, multi_page: Optional[bool] = False) -> Optional[str]:
"""
解析用户做种信息
"""

View File

@@ -111,7 +111,7 @@ class MTorrentSiteUserInfo(SiteParserBase):
"""
pass
def _parse_user_torrent_seeding_info(self, html_text: str, multi_page: bool = False) -> Optional[str]:
def _parse_user_torrent_seeding_info(self, html_text: str, multi_page: Optional[bool] = False) -> Optional[str]:
"""
解析用户做种信息
"""

View File

@@ -147,7 +147,7 @@ class NexusPhpSiteUserInfo(SiteParserBase):
return True, gold * 100 * 100 + silver * 100 + copper
return False, 0.0
def _parse_user_torrent_seeding_info(self, html_text: str, multi_page: bool = False) -> Optional[str]:
def _parse_user_torrent_seeding_info(self, html_text: str, multi_page: Optional[bool] = False) -> Optional[str]:
"""
做种相关信息
:param html_text:

View File

@@ -66,7 +66,7 @@ class NexusRabbitSiteUserInfo(SiteParserBase):
torrents = json.loads(html_text).get("data", [])
except Exception as e:
logger.error(f"解析做种信息失败: {str(e)}")
return
return None
seeding_size = 0
seeding_info = []
@@ -89,7 +89,7 @@ class NexusRabbitSiteUserInfo(SiteParserBase):
messages = json.loads(html_text).get("data", [])
except Exception as e:
logger.error(f"解析未读消息失败: {e}")
return
return None
for msg in messages:
msg_id, msg_unread = msg.get("id"), msg.get("unread")
if not (msg_id and msg_unread) or msg_unread == "no":

View File

@@ -55,7 +55,7 @@ class SmallHorseSiteUserInfo(SiteParserBase):
def _parse_user_detail_info(self, html_text: str):
pass
def _parse_user_torrent_seeding_info(self, html_text: str, multi_page: bool = False) -> Optional[str]:
def _parse_user_torrent_seeding_info(self, html_text: str, multi_page: Optional[bool] = False) -> Optional[str]:
"""
做种相关信息
:param html_text:

View File

@@ -59,7 +59,7 @@ class TNodeSiteUserInfo(SiteParserBase):
"unreadSystem", 0)
pass
def _parse_user_torrent_seeding_info(self, html_text: str, multi_page: bool = False) -> Optional[str]:
def _parse_user_torrent_seeding_info(self, html_text: str, multi_page: Optional[bool] = False) -> Optional[str]:
"""
解析用户做种信息
"""

View File

@@ -59,7 +59,7 @@ class TorrentLeechSiteUserInfo(SiteParserBase):
def _parse_user_detail_info(self, html_text: str):
pass
def _parse_user_torrent_seeding_info(self, html_text: str, multi_page: bool = False) -> Optional[str]:
def _parse_user_torrent_seeding_info(self, html_text: str, multi_page: Optional[bool] = False) -> Optional[str]:
"""
做种相关信息
:param html_text:

View File

@@ -56,7 +56,7 @@ class Unit3dSiteUserInfo(SiteParserBase):
self.join_at = StringUtils.unify_datetime_str(
join_at_text[0].replace('注册日期', '').replace('註冊日期', '').replace('Registration date', ''))
def _parse_user_torrent_seeding_info(self, html_text: str, multi_page: bool = False) -> Optional[str]:
def _parse_user_torrent_seeding_info(self, html_text: str, multi_page: Optional[bool] = False) -> Optional[str]:
"""
做种相关信息
:param html_text:

View File

@@ -73,7 +73,7 @@ class TYemaSiteUserInfo(SiteParserBase):
"""
pass
def _parse_user_torrent_seeding_info(self, html_text: str, multi_page: bool = False) -> Optional[str]:
def _parse_user_torrent_seeding_info(self, html_text: str, multi_page: Optional[bool] = False) -> Optional[str]:
"""
解析用户做种信息
"""