150讲轻松搞定Python网络爬虫-第五章:爬虫进阶

直接学习:https://edu.csdn.net/course/play/24756/284652
设置代理:
设置代理通过’ChromeOptions’来设置,示例代码如下:

options = webdriver.ChromeOptions()
options.add_argument("--proxy-server=http://110.243.23.38:9999")
driver = webdriver.Chrome(executable_path= "F:\chromedriver_win32\chromedriver.exe",chrome_options=options)
driver.get("http://httpbin.org/ip")
发布了67 篇原创文章 · 获赞 1 · 访问量 735

猜你喜欢

转载自blog.csdn.net/weixin_43597208/article/details/105393357