intro pyyml

This commit is contained in:
耿伦伦
2021-11-30 20:33:32 +08:00
parent 909f862626
commit 93ff79125f
15 changed files with 57 additions and 10 deletions

10
main.py
View File

@ -1,9 +1,15 @@
import sys
from urllib.parse import urlparse
from scripts import watcher, webdriver
from config.helper import config
if __name__ == '__main__':
webdriver.lunch(sys.argv[1])
if len(sys.argv) == 1 or not urlparse(sys.argv[1]).scheme:
print('Invalid url provided, please check...')
sys.exit(1)
w = watcher.Watcher(directory='/Users/geng/douyin_live')
webdriver.go(sys.argv[1])
w = watcher.Watcher(directory=config()['watchdog']['dir'])
w.run()