【发布时间】:2022-06-28 23:39:27
【问题描述】:
我想为我在 selenium 驱动程序中打开的每个选项卡使用不同的代理。 在python中。
示例(解释我想做什么):
import undetected_chromedriver as uc
browser = uc.Chrome()
browser.get("https://stackoverflow.com") # First tab without proxy
# Opening the second tab
browser.execute_script("window.open('about:blank', 'tab2');")
browser.switch_to.window("tab2")
browser.get("http://google.com", proxy) # Second tab with proxy
我需要帮助才能知道如何做到这一点。感谢您的帮助。
【问题讨论】:
标签: python selenium undetected-chromedriver