chromedriver: use binary location
parent
913b5d0ee3
commit
c8842759b7
|
@ -47,6 +47,10 @@ def create_tor_proxy(socks_port, control_port):
|
|||
return tor_process
|
||||
|
||||
def start_browser(use_tor=False, headless=False):
|
||||
os.mkdir(get_chrome_data_dir())
|
||||
|
||||
shutil.copy('/usr/bin/chromedriver', './'+get_chrome_data_dir())
|
||||
|
||||
options = uc.ChromeOptions()
|
||||
|
||||
if headless:
|
||||
|
@ -70,8 +74,8 @@ def start_browser(use_tor=False, headless=False):
|
|||
options.add_argument(f'--proxy-server=socks5://localhost:{SOCKS_PORT}')
|
||||
else:
|
||||
proxies = []
|
||||
|
||||
driver=uc.Chrome(options=options)
|
||||
|
||||
driver = uc.Chrome(options=options, chromedriver_executable_path=get_chrome_data_dir()+'/chromedriver')
|
||||
|
||||
ip = requests.get("http://httpbin.org/ip", proxies=proxies).json()["origin"]
|
||||
print (f'IP is {ip}')
|
||||
|
|
Loading…
Reference in New Issue