from selenium import webdriver
from selenium.webdriver import ChromeOptions
url = 'https://kjt.hebei.gov.cn/www/xwzx15/hbkjdt64/3ab0c4a6-1.html'
option = ChromeOptions()
ip = get_procxy()
option.add_argument(('--proxy-server=' + ip['https'].split('/')[
-1]))
# option.add_argument('--headless')
prefs = {"profile.managed_default_content_settings.images": 2}
option.add_experimental_option("prefs", prefs)
driver = webdriver.Chrome(chrome_options=option)
driver.get(url=url)
rsp = driver.execute_script("return document.documentElement.outerHTML")
最后
以上就是负责鱼最近收集整理的关于selenium挂代理+不加载图片(提速)的全部内容,更多相关selenium挂代理+不加载图片(提速)内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复