from selenium import webdriver
def create_webdriver():
options = webdriver.ChromeOptions()
options.add_argument('--User-Agent=xxxx')
options.add_argument('--Proxy-Authorization=xxxxx')
browser = webdriver.Chrome(chrome_options=options)
return browser
def main():
url = '
http://www.baidu.com'
browser = create_webdriver()
browser.get(url)
chrome 是不允许添加 header 吗,请求的头部并没有我添加的参数。有小伙伴遇到这种问题吗?