You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
584 B
16 lines
584 B
from LoggerUtils import Logger, initLogger
|
|
from bs4 import BeautifulSoup as bs
|
|
from urllib.request import urlopen, Request
|
|
import json
|
|
import Contant
|
|
|
|
# py .\init.py --db=../db/youtube_prod.db --logDir=./logs
|
|
if __name__ == "__main__":
|
|
# 读取配置文件
|
|
with open('init_channel_config.json', 'r', encoding='utf-8') as f:
|
|
# 使用json.load()方法读取文件内容
|
|
data = json.load(f)
|
|
Contant.logDir = data['log']['dir']
|
|
Contant.logFileName = data['log']['fileName']
|
|
initLogger(Contant.logDir, Contant.logFileName)
|
|
Logger.info(data['mysql'])
|