mirror of
https://github.com/ThePhaseless/Byparr.git
synced 2025-03-15 09:50:20 +08:00
do not skip challenged
This commit is contained in:
parent
ff267c3296
commit
070ecf2eaa
@ -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")
|
||||
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user