0

I'm trying to scrape some contents from a website that has cloudflare v2 page (with captcha) with the cloudscrape library in python but also using a paid captcha resolve service like anticaptcha I can't bypass that page and scrape the next one. I'm also using ipv6 rotating proxies that are best in market. If I open the page from an incognito page with these proxies on my pc I got no problems, cloudflare is bypassed. Here is the code I am using

def worker(q, p, proxy):
while True:
try:
scraper = cloudscraper.create_scraper(
    interpreter='nodejs',
    captcha={
        'provider': 'anticaptcha',
        'api_key': 'ANTICAPTCHA_KEY',
        'no_proxy': 'true'
    }
)

req = requests.Session()
ip, port, user, passwd = p.get(timeout=1)
i = 0

headers = {
    'sec-ch-ua': 'Chromium";v="110", "Not A(Brand";v="24", "Google Chrome";v="110',
        'sec-ch-ua-mobile': '?0',
        'sec-ch-ua-platform': 'Windows',
        'Upgrade-Insecure-Requests': '1',
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36',

    }
    response = scraper.get("https://LINK_with_cloudflare/", headers=headers, proxies=proxy)
    print(response.text)
    except queue.Empty:
    break

I tried to adapt the code for every situation but i really don't know how to solve. Here's the output I got:

Error: Detected a Cloudflare version 2 Captcha challenge, This feature is not available in the opensource (free) version.

Mopkon
  • 1
  • 2

0 Answers0