我正在尝试打开带有硒的谷歌搜索结果。我使用toripchanger迭代地更改ip。
tor_ip_changer = TorIpChanger(reuse_threshold=0,
local_http_proxy='127.0.0.1:8118')
ip = tor_ip_changer.get_new_ip()
current_ip = tor_ip_changer.get_current_ip()
PROXY = "%s:8118" % ip
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--proxy-server=https://%s' % PROXY)
browser = webdriver.Chrome("/usr/lib/chromium-browser/chromedriver",
options=chrome_options)
browser_1 = webdriver.Chrome("/usr/lib/chromium-browser/chromedriver",
options=chrome_options)
search_query = "microsoft site:instagram.com"
browser.get("https://www.google.com/search?q=" + search_query + "&start=" + str(10 * i))但是驱动程序不能打开该url。我没有从谷歌得到回应。
发布于 2019-10-28 19:09:27
在check proxy工作后,试试这个。删除"https://“
chrome_options.add_argument('--proxy-server=%s' % PROXY)https://stackoverflow.com/questions/58588713
复制相似问题