diff --git a/media_platform/bilibili/login.py b/media_platform/bilibili/login.py index ddf11bf..c0f7398 100644 --- a/media_platform/bilibili/login.py +++ b/media_platform/bilibili/login.py @@ -43,7 +43,7 @@ class BilibiliLogin(AbstractLogin): raise ValueError( "[BilibiliLogin.begin] Invalid Login Type Currently only supported qrcode or phone or cookie ...") - @retry(stop=stop_after_attempt(20), wait=wait_fixed(1), retry=retry_if_result(lambda value: value is False)) + @retry(stop=stop_after_attempt(600), wait=wait_fixed(1), retry=retry_if_result(lambda value: value is False)) async def check_login_state(self) -> bool: """ Check if the current login status is successful and return True otherwise return False diff --git a/media_platform/douyin/login.py b/media_platform/douyin/login.py index 69fa84c..e48615e 100644 --- a/media_platform/douyin/login.py +++ b/media_platform/douyin/login.py @@ -68,7 +68,7 @@ class DouYinLogin(AbstractLogin): utils.logger.info(f"[DouYinLogin.begin] Login successful then wait for {wait_redirect_seconds} seconds redirect ...") await asyncio.sleep(wait_redirect_seconds) - @retry(stop=stop_after_attempt(20), wait=wait_fixed(1), retry=retry_if_result(lambda value: value is False)) + @retry(stop=stop_after_attempt(600), wait=wait_fixed(1), retry=retry_if_result(lambda value: value is False)) async def check_login_state(self): """Check if the current login status is successful and return True otherwise return False""" current_cookie = await self.browser_context.cookies() diff --git a/media_platform/kuaishou/login.py b/media_platform/kuaishou/login.py index 001d7b0..7833139 100644 --- a/media_platform/kuaishou/login.py +++ b/media_platform/kuaishou/login.py @@ -39,7 +39,7 @@ class KuaishouLogin(AbstractLogin): else: raise ValueError("[KuaishouLogin.begin] Invalid Login Type Currently only supported qrcode or phone or cookie ...") - @retry(stop=stop_after_attempt(20), wait=wait_fixed(1), retry=retry_if_result(lambda value: value is False)) + @retry(stop=stop_after_attempt(600), wait=wait_fixed(1), retry=retry_if_result(lambda value: value is False)) async def check_login_state(self) -> bool: """ Check if the current login status is successful and return True otherwise return False diff --git a/media_platform/weibo/login.py b/media_platform/weibo/login.py index dd0d737..929aff8 100644 --- a/media_platform/weibo/login.py +++ b/media_platform/weibo/login.py @@ -44,7 +44,7 @@ class WeiboLogin(AbstractLogin): "[WeiboLogin.begin] Invalid Login Type Currently only supported qrcode or phone or cookie ...") - @retry(stop=stop_after_attempt(20), wait=wait_fixed(1), retry=retry_if_result(lambda value: value is False)) + @retry(stop=stop_after_attempt(600), wait=wait_fixed(1), retry=retry_if_result(lambda value: value is False)) async def check_login_state(self, no_logged_in_session: str) -> bool: """ Check if the current login status is successful and return True otherwise return False diff --git a/media_platform/xhs/login.py b/media_platform/xhs/login.py index 7923585..0cff85f 100644 --- a/media_platform/xhs/login.py +++ b/media_platform/xhs/login.py @@ -28,7 +28,7 @@ class XiaoHongShuLogin(AbstractLogin): self.login_phone = login_phone self.cookie_str = cookie_str - @retry(stop=stop_after_attempt(120), wait=wait_fixed(1), retry=retry_if_result(lambda value: value is False)) + @retry(stop=stop_after_attempt(600), wait=wait_fixed(1), retry=retry_if_result(lambda value: value is False)) async def check_login_state(self, no_logged_in_session: str) -> bool: """ Check if the current login status is successful and return True otherwise return False