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

0
config/__init__.py Normal file
View File

Binary file not shown.

Binary file not shown.

9
config/helper.py Normal file
View File

@ -0,0 +1,9 @@
from pathlib import Path
import yaml
def config():
settings_file = str(Path(__file__).parent.absolute()) + '/settings.yml'
with open(settings_file, 'r') as f:
return yaml.load(f, Loader=yaml.FullLoader)

11
config/settings.yml Normal file
View File

@ -0,0 +1,11 @@
watchdog:
dir: '/Users/geng/douyin_live/'
webdriver:
bin: '/usr/local/bin/chromedriver'
proxy: '127.0.0.1:8080'
mongo:
uri : 'mongodb://localhost:27017/'
dbname: 'tiktok'
enabled: 0