diff --git a/src/utils/browser.py b/src/utils/browser.py index fbdb94b..b6e1c05 100644 --- a/src/utils/browser.py +++ b/src/utils/browser.py @@ -98,7 +98,7 @@ async def bypass_cloudflare(page: webdriver.Tab): raise InvalidElementError for attr in parent.attributes: - if attr == "display: none; visibility: hidden;": + if attr == "display: none; visibility: hidden;" and not loaded: loaded = True logger.info("Page loaded") diff --git a/tests/main_test.py b/tests/main_test.py index 748aa30..9471348 100644 --- a/tests/main_test.py +++ b/tests/main_test.py @@ -17,7 +17,7 @@ test_websites = [ "https://extratorrent.st/", # github is blocking these "https://idope.se/", # github is blocking these "https://www.ygg.re/", - "https://speed.cd/", + "https://speed.cd/login", ] @@ -27,7 +27,10 @@ def test_bypass(website: str): test_request = httpx.get( website, ) - if test_request.status_code != HTTPStatus.OK: + if ( + test_request.status_code != HTTPStatus.OK + and "Just a moment..." not in test_request.text + ): logger.info(f"Skipping {website} due to {test_request.status_code}") pytest.skip()