-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathConstants.py
139 lines (134 loc) · 3.74 KB
/
Constants.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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#!/usr/bin/python
# -*- coding: utf8 -*-
from webparser import QQWebParser, QQWebParserMP4, WangyiWebParser, YinyuetaiWebParser, YoukuWebParser, YoutubeWebParser, ClubWebParser, UnknownParser, SohuWebParser, KankanWebParser
websites = {
"qq": {
"title": "腾讯视频(flv)",
"url": "http://v.qq.com",
"home": "http://v.qq.com/rank/index/-1_-1_-1.html",
"parser": QQWebParser,
"icon": "/static/img/favicon/qq.ico",
"info": "flv格式,不分段,但不能选择清晰度。",
"merge": True
},
"qqmp4": {
"title": "腾讯视频(分段)",
"url": "http://v.qq.com",
"home": "http://v.qq.com/rank/index/-1_-1_-1.html",
"parser": QQWebParserMP4,
"icon": "/static/img/favicon/qq.ico",
"info": "分段,可选择清晰度。"
},
"youku": {
"title": "优酷视频(推荐)",
"url": "http://www.youku.com",
"home": "http://www.youku.com/v/",
"parser": YoukuWebParser,
"icon": "/static/img/favicon/youku.ico",
"info": "不分段,可选择清晰度。",
"merge": True
},
"wangyi": {
"title": "网易公开课",
"url": "http://open.163.com",
"parser": WangyiWebParser,
"icon": "/static/img/favicon/wangyi.ico",
"info": "不分段",
"merge": True
},
"yinyuetai": {
"title": "音悦台",
"url": "http://www.yinyuetai.com",
"parser": YinyuetaiWebParser,
"icon": "/static/img/favicon/yinyuetai.ico",
"info": "Nothing"
},
"kankan": {
"title": "迅雷看看",
"url": "http://www.kankan.com",
"parser": KankanWebParser,
"icon": "/static/img/favicon/kankan.ico",
"info": "Nothing",
"merge": True
},
"youtube": {
"title": "Youtube",
"url": "http://www.youtube.com",
"parser": YoutubeWebParser,
"icon": "/static/img/favicon/youtube.ico",
"info": "Nothing"
},
"sohu": {
"title": "搜狐视频",
"url": "http://tv.sohu.com",
"home": "http://so.tv.sohu.com/list_p11_p2_p3_p4-1_p5_p6_p70_p80_p9_2d2_p101_p11.html",
"parser": SohuWebParser,
"icon": "/static/img/favicon/sohu.ico",
"info": "",
"merge": True
},
"club": {
"title": "影迷俱乐部",
"url": "http://videozaixian.com",
"parser": ClubWebParser,
"icon": "/static/img/favicon/club.png",
"info": "",
"merge": True
},
"unknown": {
"title": "Unknown",
"parser": UnknownParser
}
}
# actionToKey = {
# 'pause': 'p',
# 'stop': 'q',
# 'volup': '+',
# 'voldown': '-',
# 'f30': '\x1B[D',
# 'b30': '\x1B[C',
# 'f600': '\x1B[A',
# 'b600': '\x1B[B',
# 'showinfo': 'z',
# 'speedup': '1',
# 'speeddown': '2',
# 'togglesub': 's',
# }
actionDesc = [
[
('pause', 'Pause'),
('stop', 'Stop'),
('volup', 'Increase Volume'),
('voldown', 'Decrease Volume')
],
# [
# ('f30', 'Seek +30'),
# ('b30', 'Seek -30'),
# ('f600', 'Seek +600'),
# ('b600', 'Seek -600')
# ],
# [
# ('showinfo', 'z'),
# ('speedup', '1'),
# ('speeddown', '2'),
# ('togglesub', 's'),
# ]
]
# actionToKeyMac = {
# 'MPlayerX':
# {
# 'pause': '49',
# 'stop': '12 using command down',
# 'volup': '24',
# 'voldown': '27',
# 'fullscreen': '3',
# },
# 'VLC':
# {
# 'pause': '49',
# 'stop': '12 using command down',
# 'volup': '126 using command down',
# 'voldown': '125 using command down',
# 'fullscreen': '3 using command down',
# }
# }