do not skip challenged

This commit is contained in:
Thephaseless 2024-10-27 18:32:06 +00:00
parent ff267c3296
commit 070ecf2eaa
2 changed files with 6 additions and 3 deletions

View File

@ -98,7 +98,7 @@ async def bypass_cloudflare(page: webdriver.Tab):
raise InvalidElementError raise InvalidElementError
for attr in parent.attributes: for attr in parent.attributes:
if attr == "display: none; visibility: hidden;": if attr == "display: none; visibility: hidden;" and not loaded:
loaded = True loaded = True
logger.info("Page loaded") logger.info("Page loaded")

View File

@ -17,7 +17,7 @@ test_websites = [
"https://extratorrent.st/", # github is blocking these "https://extratorrent.st/", # github is blocking these
"https://idope.se/", # github is blocking these "https://idope.se/", # github is blocking these
"https://www.ygg.re/", "https://www.ygg.re/",
"https://speed.cd/", "https://speed.cd/login",
] ]
@ -27,7 +27,10 @@ def test_bypass(website: str):
test_request = httpx.get( test_request = httpx.get(
website, 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}") logger.info(f"Skipping {website} due to {test_request.status_code}")
pytest.skip() pytest.skip()