python main.py url
This commit is contained in:
parent
eca14a3d7e
commit
e000a7cb35
4
main.py
4
main.py
@ -1,7 +1,9 @@
|
||||
import sys
|
||||
|
||||
from scripts import watcher, webdriver
|
||||
|
||||
if __name__ == '__main__':
|
||||
webdriver.lunch()
|
||||
webdriver.lunch(sys.argv[1])
|
||||
|
||||
w = watcher.Watcher(directory='/Users/geng/douyin_live')
|
||||
w.run()
|
||||
|
@ -1,7 +1,7 @@
|
||||
from selenium import webdriver
|
||||
from selenium.webdriver.chrome.options import Options
|
||||
|
||||
def lunch():
|
||||
def lunch(url):
|
||||
chrome_options = Options()
|
||||
chrome_options.add_argument('--proxy-server=127.0.0.1:8080')
|
||||
chrome_options.add_argument('--headless')
|
||||
@ -9,5 +9,5 @@ def lunch():
|
||||
|
||||
driver = webdriver.Chrome(options=chrome_options)
|
||||
|
||||
driver.get('https://live.douyin.com/515848215303')
|
||||
driver.get(url)
|
||||
|
||||
|
Reference in New Issue
Block a user