This repository has been archived on 2024-09-10. You can view files and clone it, but cannot push or open issues or pull requests.
Douyin_Web_Live/scripts/webdriver.py
2021-11-30 17:16:33 +08:00

14 lines
380 B
Python

from selenium import webdriver
from selenium.webdriver.chrome.options import Options
def lunch(url):
chrome_options = Options()
chrome_options.add_argument('--proxy-server=127.0.0.1:8080')
chrome_options.add_argument('--headless')
chrome_options.add_experimental_option('detach', True)
driver = webdriver.Chrome(options=chrome_options)
driver.get(url)