-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathStart.py
64 lines (50 loc) · 1.55 KB
/
Start.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import cunhua,jiji,Douyu,configparser,hashlib,v2ex
from urllib import parse
import os, sys
from Email import mail
# mail("定时任务","Lunatic_Ubuntu")
parent_dir = os.path.dirname(os.path.abspath(__file__))
config = configparser.RawConfigParser()
config.read(parent_dir+'/Setting.conf', encoding='utf-8-sig')
# Setting
dDouyu = config.get('Setting','douyu')
cCunhua = config.get('Setting','cunhua')
jJiji = config.get('Setting','jiji')
V2ex = config.get('Setting','v2ex')
# cunhua
cunhuaCookie = None
if cCunhua == '1':
cunhuaCookie = config.get('cunhua','Cookie')
# jiji
jijiUser = None
jijiPassWord = None
if jJiji == '1':
jijiUser = config.get('jiji','User')
jijiUser = parse.quote(jijiUser)
jijiPassWord = config.get('jiji','PassWord')
# douyu
douyuCookie = None
douyuList = None
douyuNum = None
douyuSum = None
if dDouyu == '1':
douyuCookie = config.get('douyu','cookie')
oldlist = config.get('douyu','list')
douyuList = str(oldlist).split('-')
oldnum = config.get('douyu','num')
douyuNum = str(oldnum).split('-')
oldSum = config.get('douyu','sum')
douyuSum = int(oldSum)
# v2ex
v2exC = None
if V2ex == '1':
v2exC = config.get('v2ex','cookie')
if __name__ == '__main__':
if dDouyu == '1':
Douyu.main(cookies=douyuCookie,sum=douyuSum,idList=douyuList,nubList=douyuNum)
if jJiji == '1':
jiji.main(jijiUser, jijiPassWord)
if V2ex == '1':
v2ex.main(v2exC)
if cCunhua == '1':
cunhua.main(cunhuaCookie)