解决采集时使用selenium被屏蔽的办法
实用seleniumbase uc模式

from seleniumbase import Driver
driver =  Driver(uc=True) # 使用UC模式

UC模式是基于undetected-chromedriver 但做了一些优化更新,使用起来更方便
官方例子:

from seleniumbase import Driver

driver = Driver(uc=True)
driver.uc_open_with_reconnect("https://nowsecure.nl/#relax", 5)
driver.quit()

关于seleniumbase 更多,请参考官方文档
https://seleniumbase.io/help_docs/uc_mode/

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐