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挂代理+不加载图片(提速)
最新推荐文章于 2023-03-12 12:18:11 发布