botasaurus
botasaurus copied to clipboard
examples: captcha on every request to g2
summary
Seems like the examples are outdated... Every example with g2.com lead to a captcha:
code used
from botasaurus.browser import browser, Driver
@browser
def scrape_heading_task(driver: Driver, data):
driver.google_get("https://www.g2.com/products/github/reviews.html?page=5&product_id=github", bypass_cloudflare=True)
driver.prompt()
heading = driver.get_text('.product-head__title [itemprop="name"]')
return heading
scrape_heading_task()
versions
At the time of writing, I'm on latest revision of the library and Chrome on Debian Linux (Python 3.11).
addition information
IP is not blocked. "Normal" browsers (Firefox, LibreWolf, Chrome directly started) work.
Same issue for me
Try this
@browser(remove_default_browser_check_argument=True,) def run_bot_tests(driver: Driver, _): driver.google_get("https://www.g2.com/products/github/reviews") driver.prompt()
run_bot_tests()