Saturday, 15 August 2015

Pass Proxy Auth Using Python Selenium for Chrome -



Pass Proxy Auth Using Python Selenium for Chrome -

i trying scrape using proxy proxymesh.com

i using next code, opens chrome , creates javascript alert input username , password. doing manually everytime run new instance of script.

if please help in automating it.

there 2 ways it,

either somehow pass username , password through chrome options

or

somehow create webdriver switch javascript alert , come in username , password there.

here code far,

from selenium import webdriver chrome_option = webdriver.chromeoptions() chrome_option.add_argument("--proxy-server=http://us.proxymesh.com:31280") b = webdriver.chrome('chromedriver.exe', chrome_options=chrome_option) "do something"

thanks in advance

python-2.7 selenium proxy selenium-chromedriver

No comments:

Post a Comment