seleniumbase / SeleniumBase

📊 Python's all-in-one framework for web crawling, scraping, testing, and reporting. Supports pytest. UC Mode provides stealth. Includes many tools.
https://seleniumbase.io
MIT License
5.2k stars 964 forks source link

Please add driver.requests for UC mode #3041

Closed ranni-follower closed 1 month ago

ranni-follower commented 1 month ago

I'm scraping a certain website and need to use uc_open_with_reconnect() to bypass their checks. Their html doesn't display every information. I need to sniff the requests and responses. But when using driver = Driver(uc=True, wire=True), I got error AttributeError: 'Chrome' object has no attribute 'requests'. It does work when uc=False though

Please add driver.requests for UC mode.

mdmintz commented 1 month ago

Duplicate of https://github.com/seleniumbase/SeleniumBase/issues/1774#issuecomment-1444399269, https://github.com/seleniumbase/SeleniumBase/issues/2032#issuecomment-1693931853, https://github.com/seleniumbase/SeleniumBase/issues/2151#issuecomment-1741234068, etc.

Due to unresolved issues with selenium-wire: https://github.com/wkeeling/selenium-wire/search?q=undetected&type=issues, UC Mode and Wire Mode cannot be combined. Pick one or the other.

(driver.requests is part of selenium-wire)


There are ways of getting that data in UC Mode without Wire Mode. Examples: