New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bypass failed #13
Comments
|
You can try from playwright.async_api import async_playwright
from cf_clearance import async_stealth, async_cf_retry
async def test_cf_challenge(url: str):
async with async_playwright() as p:
browser = await p.chromium.launch(headless=False, proxy={"server": "socks5://localhost:7890"})
page = await browser.new_page()
await async_stealth(page, pure=True)
await page.goto(url)
res = await async_cf_retry(page)
if res:
cookies = await page.context.cookies()
for cookie in cookies:
if cookie.get('name') == 'cf_clearance':
cf_clearance_value = cookie.get('value')
print(cf_clearance_value)
ua = await page.evaluate('() => {return navigator.userAgent}')
print(ua)
else:
print("cf challenge fail")
await browser.close()
if __name__ == '__main__':
import asyncio
asyncio.run(test_cf_challenge("https://cableav.tv/")) |
ok thanks, looks like i have to save cookies |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some pages can be bypassed ,some not working
The text was updated successfully, but these errors were encountered: