python main.py url

This commit is contained in:
耿伦伦 2021-11-30 17:16:33 +08:00
parent eca14a3d7e
commit e000a7cb35
2 changed files with 5 additions and 3 deletions

View File

@ -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()

View File

@ -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)