omkarcloud / botasaurus

The All in One Framework to build Awesome Scrapers.
https://www.omkar.cloud/botasaurus/
MIT License
1.16k stars 104 forks source link

Cloudflare Failed #49

Closed M-Zubair10 closed 5 months ago

M-Zubair10 commented 5 months ago

When I tried to open the form page using proxy, cloudflare fails, otherwise solves

code

import os.path

from botasaurus import *
from botasaurus.create_stealth_driver import create_stealth_driver

@browser(
    # user_agent=bt.UserAgent.REAL,
    # window_size=bt.WindowSize.REAL,
    create_driver=create_stealth_driver(
        start_url="https://dashboard.capsolver.com/passport/login",
    ),
)
def scrape_heading_task(driver: AntiDetectDriver, data):
    driver.prompt()
    heading = driver.text('h1')
    return heading

scrape_heading_task()

Thanks

raunaqss commented 5 months ago

The proxy is probably the issue. Try using a different service?