-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py.example
101 lines (92 loc) · 2.57 KB
/
config.py.example
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
from urlparse import urljoin
APP_KEY = 'YOUR APP_KEY'
APP_SECRET = 'YOUR APP_SECRET'
ACCESS_TOKEN = 'YOUR ACCESS_TOKEN'
EXPIRES_IN = 'YOUR_EXPIRES_IN'
CALLBACK_URL = 'http://example.com:8080'
# douban
API_KEY = 'YOUR API_KEY'
ROOT = 'http://strs.gdufs.edu.cn/web/'
BASIC_URL = 'VOD/vod_sourcelist.asp?Groupid=%d&FirstTypeID=%d'
INDEX = {
'xydt': {
'group_id': 3,
'firsttype_id': {
'sstj': 3391,
'xywh': 3546,
'gwmsgkk': 2874,
'mxmsgkk': 2142,
'mtgw': 1228,
'jslt': 818,
'bkyd': 3109,
'ycdv': 2805,
'xshd': 1788,
'jzypx': 824
}
},
'dsjj': {
'group_id': 2,
'firsttype_id': {
'bbc': 30,
'cnn': 3133,
'cctv_news': 20,
'newsasia': 2132,
'mzt': 44,
'gjt': 27,
'gzyyt': 35,
'hall': 52,
'gjdl': 104,
'tspd': 28,
'French': 58,
'German': 59,
'Spanish': 60,
'Indonesian': 55,
'Japanese': 56,
'Italian': 50,
'Russian': 51,
'R1TV': 1212,
'JPBS': 759,
'Portuguese': 229,
'Vietnamese': 53,
'ysgj': 15,
'wywh': 3412,
'agys': 12,
'yskj': 21,
'Arabic': 29
}
},
'dyjx': {
'group_id': 1,
'firsttype_id': {
'western': 879,
'inland': 875,
'HKTW': 877,
'Asia': 881,
'Classic': 899,
'anime': 893
}
},
'szjy': {
'group_id': 4,
'firsttype_id': {
'dyxx': 3207,
'qdhd': 3416,
'ssjd': 3406,
'aqjy': 836
}
},
'jxkj': {
'group_id': 5,
'firsttype_id': {
'jxkj': 1100,
'xyyytl': 4188
}
}
}
def enumerate_index(index=INDEX):
all_url = []
for values in index.itervalues():
for value in values.get('firsttype_id').itervalues():
all_url.append(urljoin(ROOT, BASIC_URL) % (values.get('group_id'),
value))
return all_url