守则是:
def request():
proxy_ip_port = '129.41.171.244:8000'
options = webdriver.ChromeOptions()
options.add_argument(f'--proxy-server={self.proxy_ip_port}')
driver = webdriver.Chrome(
executable_path=PATH,
options=options
)
driver.get('http://icanhazip.com')
time.sleep(5)
driver.quit()
它应该通过代理服务器加载页面,但是每次我启动脚本时,我都会看到消息“上游连接错误或头前断开/重置。重置原因:溢出”而不是页面。我的操作系统是Ubuntu。谢谢!
发布于 2022-08-20 05:00:47
我已经想明白了。问题出在过载的代理中。
https://stackoverflow.com/questions/73426830
复制相似问题