gaozhong.py 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554
  1. #coding=utf-8
  2. #!/usr/bin/python
  3. import sys
  4. sys.path.append('..')
  5. from base.spider import Spider
  6. import json
  7. import time
  8. import base64
  9. class Spider(Spider): # 元类 默认的元类 type
  10. def getName(self):
  11. return "高中"
  12. def init(self,extend=""):
  13. print("============{0}============".format(extend))
  14. pass
  15. def isVideoFormat(self,url):
  16. pass
  17. def manualVideoCheck(self):
  18. pass
  19. def homeContent(self,filter):
  20. result = {}
  21. cateManual = {
  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. classes = []
  53. for k in cateManual:
  54. classes.append({
  55. 'type_name':k,
  56. 'type_id':cateManual[k]
  57. })
  58. result['class'] = classes
  59. if(filter):
  60. result['filters'] = self.config['filter']
  61. return result
  62. def homeVideoContent(self):
  63. result = {
  64. 'list':[]
  65. }
  66. return result
  67. cookies = ''
  68. def getCookie(self):
  69. import requests
  70. import http.cookies
  71. # 这里填cookie
  72. raw_cookie_line = "innersign=0;buvid3=E0C6010B-08CF-AE9C-FD18-0EC14F2AA35429667infoc; b_lsid=D101097FB2_187C825C5D7; _uuid=29167C75-10922-A764-5757-EC106517B471831442infoc; buvid4=59789C83-B64B-148E-A8FD-585BB3D0300830827-123042821-WOiBDeHIjjEhSRIFCi5kfQ%3D%3D; buvid_fp=3ee98313cd55b76fe3cb63a36d9d41c9; b_nut=100; SESSDATA=4fe90c6b%2C1698242168%2C30912%2A41; bili_jct=faffed7de17218860f3aa958182ca2ee; DedeUserID=516036434; DedeUserID__ckMd5=4e5107a4bc891865; sid=q2dc0y62"
  73. simple_cookie = http.cookies.SimpleCookie(raw_cookie_line)
  74. cookie_jar = requests.cookies.RequestsCookieJar()
  75. cookie_jar.update(simple_cookie)
  76. return cookie_jar
  77. def get_dynamic(self,pg):
  78. result = {}
  79. url= 'https://api.bilibili.com/x/polymer/web-dynamic/v1/feed/all?timezone_offset=-480&type=all&page={0}'.format(pg)
  80. rsp = self.fetch(url,cookies=self.getCookie())
  81. content = rsp.text
  82. jo = json.loads(content)
  83. if jo['code'] == 0:
  84. videos = []
  85. vodList = jo['data']['items']
  86. for vod in vodList:
  87. if vod['type'] == 'DYNAMIC_TYPE_AV':
  88. ivod = vod['modules']['module_dynamic']['major']['archive']
  89. aid = str(ivod['aid']).strip()
  90. title = ivod['title'].strip().replace("<em class=\"keyword\">","").replace("</em>","")
  91. img = ivod['cover'].strip()
  92. remark = str(ivod['duration_text']).strip()
  93. videos.append({
  94. "vod_id":aid,
  95. "vod_name":title,
  96. "vod_pic":img,
  97. "vod_remarks":remark
  98. })
  99. result['list'] = videos
  100. result['page'] = pg
  101. result['pagecount'] = 9999
  102. result['limit'] = 90
  103. result['total'] = 999999
  104. return result
  105. def get_hot(self,pg):
  106. result = {}
  107. url= 'https://api.bilibili.com/x/web-interface/popular?ps=20&pn={0}'.format(pg)
  108. rsp = self.fetch(url,cookies=self.getCookie())
  109. content = rsp.text
  110. jo = json.loads(content)
  111. if jo['code'] == 0:
  112. videos = []
  113. vodList = jo['data']['list']
  114. for vod in vodList:
  115. aid = str(vod['aid']).strip()
  116. title = vod['title'].strip().replace("<em class=\"keyword\">","").replace("</em>","")
  117. img = vod['pic'].strip()
  118. remark = str(vod['duration']).strip()
  119. videos.append({
  120. "vod_id":aid,
  121. "vod_name":title,
  122. "vod_pic":img,
  123. "vod_remarks":remark
  124. })
  125. result['list'] = videos
  126. result['page'] = pg
  127. result['pagecount'] = 9999
  128. result['limit'] = 90
  129. result['total'] = 999999
  130. return result
  131. def get_rank(self):
  132. result = {}
  133. url= 'https://api.bilibili.com/x/web-interface/ranking/v2?rid=0&type=all'
  134. rsp = self.fetch(url,cookies=self.getCookie())
  135. content = rsp.text
  136. jo = json.loads(content)
  137. if jo['code'] == 0:
  138. videos = []
  139. vodList = jo['data']['list']
  140. for vod in vodList:
  141. aid = str(vod['aid']).strip()
  142. title = vod['title'].strip().replace("<em class=\"keyword\">","").replace("</em>","")
  143. img = vod['pic'].strip()
  144. remark = str(vod['duration']).strip()
  145. videos.append({
  146. "vod_id":aid,
  147. "vod_name":title,
  148. "vod_pic":img,
  149. "vod_remarks":remark
  150. })
  151. result['list'] = videos
  152. result['page'] = 1
  153. result['pagecount'] = 1
  154. result['limit'] = 90
  155. result['total'] = 999999
  156. return result
  157. def categoryContent(self,tid,pg,filter,extend):
  158. result = {}
  159. if tid == "热门":
  160. return self.get_hot(pg=pg)
  161. if tid == "排行榜" :
  162. return self.get_rank()
  163. if tid == '动态':
  164. return self.get_dynamic(pg=pg)
  165. url = 'https://api.bilibili.com/x/web-interface/search/type?search_type=video&keyword={0}&page={1}'.format(tid,pg)
  166. if len(self.cookies) <= 0:
  167. self.getCookie()
  168. rsp = self.fetch(url,cookies=self.getCookie())
  169. content = rsp.text
  170. jo = json.loads(content)
  171. if jo['code'] != 0:
  172. rspRetry = self.fetch(url,cookies=self.getCookie())
  173. content = rspRetry.text
  174. jo = json.loads(content)
  175. videos = []
  176. vodList = jo['data']['result']
  177. for vod in vodList:
  178. aid = str(vod['aid']).strip()
  179. title = tid + ":" + vod['title'].strip().replace("<em class=\"keyword\">","").replace("</em>","")
  180. img = 'https:' + vod['pic'].strip()
  181. remark = str(vod['duration']).strip()
  182. videos.append({
  183. "vod_id":aid,
  184. "vod_name":title,
  185. "vod_pic":img,
  186. "vod_remarks":remark
  187. })
  188. result['list'] = videos
  189. result['page'] = pg
  190. result['pagecount'] = 9999
  191. result['limit'] = 90
  192. result['total'] = 999999
  193. return result
  194. def cleanSpace(self,str):
  195. return str.replace('\n','').replace('\t','').replace('\r','').replace(' ','')
  196. def detailContent(self,array):
  197. aid = array[0]
  198. url = "https://api.bilibili.com/x/web-interface/view?aid={0}".format(aid)
  199. rsp = self.fetch(url,headers=self.header,cookies=self.getCookie())
  200. jRoot = json.loads(rsp.text)
  201. jo = jRoot['data']
  202. title = jo['title'].replace("<em class=\"keyword\">","").replace("</em>","")
  203. pic = jo['pic']
  204. desc = jo['desc']
  205. typeName = jo['tname']
  206. vod = {
  207. "vod_id":aid,
  208. "vod_name":title,
  209. "vod_pic":pic,
  210. "type_name":typeName,
  211. "vod_year":"",
  212. "vod_area":"bilidanmu",
  213. "vod_remarks":"",
  214. "vod_actor":jo['owner']['name'],
  215. "vod_director":jo['owner']['name'],
  216. "vod_content":desc
  217. }
  218. ja = jo['pages']
  219. playUrl = ''
  220. for tmpJo in ja:
  221. cid = tmpJo['cid']
  222. part = tmpJo['part']
  223. playUrl = playUrl + '{0}${1}_{2}#'.format(part,aid,cid)
  224. vod['vod_play_from'] = 'B站'
  225. vod['vod_play_url'] = playUrl
  226. result = {
  227. 'list':[
  228. vod
  229. ]
  230. }
  231. return result
  232. def searchContent(self,key,quick):
  233. search = self.categoryContent(tid=key,pg=1,filter=None,extend=None)
  234. result = {
  235. 'list':search['list']
  236. }
  237. return result
  238. def playerContent(self,flag,id,vipFlags):
  239. # https://www.555dianying.cc/vodplay/static/js/playerconfig.js
  240. result = {}
  241. ids = id.split("_")
  242. url = 'https://api.bilibili.com:443/x/player/playurl?avid={0}&cid=%20%20{1}&qn=112'.format(ids[0],ids[1])
  243. rsp = self.fetch(url,cookies=self.getCookie())
  244. jRoot = json.loads(rsp.text)
  245. jo = jRoot['data']
  246. ja = jo['durl']
  247. maxSize = -1
  248. position = -1
  249. for i in range(len(ja)):
  250. tmpJo = ja[i]
  251. if maxSize < int(tmpJo['size']):
  252. maxSize = int(tmpJo['size'])
  253. position = i
  254. url = ''
  255. if len(ja) > 0:
  256. if position == -1:
  257. position = 0
  258. url = ja[position]['url']
  259. result["parse"] = 0
  260. result["playUrl"] = ''
  261. result["url"] = url
  262. result["header"] = {
  263. "Referer":"https://www.bilibili.com",
  264. "User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"
  265. }
  266. result["contentType"] = 'video/x-flv'
  267. return result
  268. config = {
  269. "player": {},
  270. "filter": {
  271. "高一语文": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高一语文"},
  272. {"n": "沪教版","v": "沪教版高一语文"},
  273. {"n": "人教版","v": "人教版高一语文"},
  274. {"n": "北师大版","v": "北师大版高一语文"},
  275. {"n": "苏教版","v": "苏教版高一语文"}]},
  276. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  277. {"n": "60分钟以上","v": "4"},
  278. {"n": "30~60分钟","v": "3"},
  279. {"n": "10~30分钟","v": "2"},
  280. {"n": "10分钟以下","v": "1"}]}],
  281. "高一英语": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高一英语"},
  282. {"n": "沪教版","v": "沪教版高一英语"},
  283. {"n": "人教版","v": "人教版高一英语"},
  284. {"n": "北师大版","v": "北师大版高一英语"},
  285. {"n": "苏教版","v": "苏教版高一英语"}]},
  286. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  287. {"n": "60分钟以上","v": "4"},
  288. {"n": "30~60分钟","v": "3"},
  289. {"n": "10~30分钟","v": "2"},
  290. {"n": "10分钟以下","v": "1"}]}],
  291. "高一数学": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高一数学"},
  292. {"n": "沪教版","v": "沪教版高一数学"},
  293. {"n": "人教版","v": "人教版高一数学"},
  294. {"n": "北师大版","v": "北师大版高一数学"},
  295. {"n": "苏教版","v": "苏教版高一数学"}]},
  296. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  297. {"n": "60分钟以上","v": "4"},
  298. {"n": "30~60分钟","v": "3"},
  299. {"n": "10~30分钟","v": "2"},
  300. {"n": "10分钟以下","v": "1"}]}],
  301. "高一化学": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高一化学"},
  302. {"n": "沪教版","v": "沪教版高一化学"},
  303. {"n": "人教版","v": "人教版高一化学"},
  304. {"n": "北师大版","v": "北师大版高一化学"},
  305. {"n": "苏教版","v": "苏教版高一化学"}]},
  306. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  307. {"n": "60分钟以上","v": "4"},
  308. {"n": "30~60分钟","v": "3"},
  309. {"n": "10~30分钟","v": "2"},
  310. {"n": "10分钟以下","v": "1"}]}],
  311. "高一物理": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高一物理"},
  312. {"n": "沪教版","v": "沪教版高一物理"},
  313. {"n": "人教版","v": "人教版高一物理"},
  314. {"n": "北师大版","v": "北师大版高一物理"},
  315. {"n": "苏教版","v": "苏教版高一物理"}]},
  316. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  317. {"n": "60分钟以上","v": "4"},
  318. {"n": "30~60分钟","v": "3"},
  319. {"n": "10~30分钟","v": "2"},
  320. {"n": "10分钟以下","v": "1"}]}],
  321. "高一生物": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高一生物"},
  322. {"n": "沪教版","v": "沪教版高一生物"},
  323. {"n": "人教版","v": "人教版高一生物"},
  324. {"n": "北师大版","v": "北师大版高一生物"},
  325. {"n": "苏教版","v": "苏教版高一生物"}]},
  326. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  327. {"n": "60分钟以上","v": "4"},
  328. {"n": "30~60分钟","v": "3"},
  329. {"n": "10~30分钟","v": "2"},
  330. {"n": "10分钟以下","v": "1"}]}],
  331. "高一地理": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高一地理"},
  332. {"n": "沪教版","v": "沪教版高一地理"},
  333. {"n": "人教版","v": "人教版高一地理"},
  334. {"n": "北师大版","v": "北师大版高一地理"},
  335. {"n": "苏教版","v": "苏教版高一地理"}]},
  336. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  337. {"n": "60分钟以上","v": "4"},
  338. {"n": "30~60分钟","v": "3"},
  339. {"n": "10~30分钟","v": "2"},
  340. {"n": "10分钟以下","v": "1"}]}],
  341. "高一历史": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高一历史"},
  342. {"n": "沪教版","v": "沪教版高一历史"},
  343. {"n": "人教版","v": "人教版高一历史"},
  344. {"n": "北师大版","v": "北师大版高一历史"},
  345. {"n": "苏教版","v": "苏教版高一历史"}]},
  346. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  347. {"n": "60分钟以上","v": "4"},
  348. {"n": "30~60分钟","v": "3"},
  349. {"n": "10~30分钟","v": "2"},
  350. {"n": "10分钟以下","v": "1"}]}],
  351. "高二语文": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高二语文"},
  352. {"n": "沪教版","v": "沪教版高二语文"},
  353. {"n": "人教版","v": "人教版高二语文"},
  354. {"n": "北师大版","v": "北师大版高二语文"},
  355. {"n": "苏教版","v": "苏教版高二语文"}]},
  356. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  357. {"n": "60分钟以上","v": "4"},
  358. {"n": "30~60分钟","v": "3"},
  359. {"n": "10~30分钟","v": "2"},
  360. {"n": "10分钟以下","v": "1"}]}],
  361. "高二英语": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高二英语"},
  362. {"n": "沪教版","v": "沪教版高二英语"},
  363. {"n": "人教版","v": "人教版高二英语"},
  364. {"n": "北师大版","v": "北师大版高二英语"},
  365. {"n": "苏教版","v": "苏教版高二英语"}]},
  366. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  367. {"n": "60分钟以上","v": "4"},
  368. {"n": "30~60分钟","v": "3"},
  369. {"n": "10~30分钟","v": "2"},
  370. {"n": "10分钟以下","v": "1"}]}],
  371. "高二数学": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高二数学"},
  372. {"n": "沪教版","v": "沪教版高二数学"},
  373. {"n": "人教版","v": "人教版高二数学"},
  374. {"n": "北师大版","v": "北师大版高二数学"},
  375. {"n": "苏教版","v": "苏教版高二数学"}]},
  376. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  377. {"n": "60分钟以上","v": "4"},
  378. {"n": "30~60分钟","v": "3"},
  379. {"n": "10~30分钟","v": "2"},
  380. {"n": "10分钟以下","v": "1"}]}],
  381. "高二地理": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高二地理"},
  382. {"n": "沪教版","v": "沪教版高二地理"},
  383. {"n": "人教版","v": "人教版高二地理"},
  384. {"n": "北师大版","v": "北师大版高二地理"},
  385. {"n": "苏教版","v": "苏教版高二地理"}]},
  386. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  387. {"n": "60分钟以上","v": "4"},
  388. {"n": "30~60分钟","v": "3"},
  389. {"n": "10~30分钟","v": "2"},
  390. {"n": "10分钟以下","v": "1"}]}],
  391. "高二化学": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高二化学"},
  392. {"n": "沪教版","v": "沪教版高二化学"},
  393. {"n": "人教版","v": "人教版高二化学"},
  394. {"n": "北师大版","v": "北师大版高二化学"},
  395. {"n": "苏教版","v": "苏教版高二化学"}]},
  396. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  397. {"n": "60分钟以上","v": "4"},
  398. {"n": "30~60分钟","v": "3"},
  399. {"n": "10~30分钟","v": "2"},
  400. {"n": "10分钟以下","v": "1"}]}],
  401. "高二物理": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高二物理"},
  402. {"n": "沪教版","v": "沪教版高二物理"},
  403. {"n": "人教版","v": "人教版高二物理"},
  404. {"n": "北师大版","v": "北师大版高二物理"},
  405. {"n": "苏教版","v": "苏教版高二物理"}]},
  406. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  407. {"n": "60分钟以上","v": "4"},
  408. {"n": "30~60分钟","v": "3"},
  409. {"n": "10~30分钟","v": "2"},
  410. {"n": "10分钟以下","v": "1"}]}],
  411. "高二生物": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高二生物"},
  412. {"n": "沪教版","v": "沪教版高二生物"},
  413. {"n": "人教版","v": "人教版高二生物"},
  414. {"n": "北师大版","v": "北师大版高二生物"},
  415. {"n": "苏教版","v": "苏教版高二生物"}]},
  416. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  417. {"n": "60分钟以上","v": "4"},
  418. {"n": "30~60分钟","v": "3"},
  419. {"n": "10~30分钟","v": "2"},
  420. {"n": "10分钟以下","v": "1"}]}],
  421. "高二历史": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高二历史"},
  422. {"n": "沪教版","v": "沪教版高二历史"},
  423. {"n": "人教版","v": "人教版高二历史"},
  424. {"n": "北师大版","v": "北师大版高二历史"},
  425. {"n": "苏教版","v": "苏教版高二历史"}]},
  426. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  427. {"n": "60分钟以上","v": "4"},
  428. {"n": "30~60分钟","v": "3"},
  429. {"n": "10~30分钟","v": "2"},
  430. {"n": "10分钟以下","v": "1"}]}],
  431. "高三语文": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高三语文"},
  432. {"n": "沪教版","v": "沪教版高三语文"},
  433. {"n": "人教版","v": "人教版高三语文"},
  434. {"n": "北师大版","v": "北师大版高三语文"},
  435. {"n": "苏教版","v": "苏教版高三语文"}]},
  436. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  437. {"n": "60分钟以上","v": "4"},
  438. {"n": "30~60分钟","v": "3"},
  439. {"n": "10~30分钟","v": "2"},
  440. {"n": "10分钟以下","v": "1"}]}],
  441. "高三英语": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高三英语"},
  442. {"n": "沪教版","v": "沪教版高三英语"},
  443. {"n": "人教版","v": "人教版高三英语"},
  444. {"n": "北师大版","v": "北师大版高三英语"},
  445. {"n": "苏教版","v": "苏教版高三英语"}]},
  446. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  447. {"n": "60分钟以上","v": "4"},
  448. {"n": "30~60分钟","v": "3"},
  449. {"n": "10~30分钟","v": "2"},
  450. {"n": "10分钟以下","v": "1"}]}],
  451. "高三数学": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高三数学"},
  452. {"n": "沪教版","v": "沪教版高三数学"},
  453. {"n": "人教版","v": "人教版高三数学"},
  454. {"n": "北师大版","v": "北师大版高三数学"},
  455. {"n": "苏教版","v": "苏教版高三数学"}]},
  456. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  457. {"n": "60分钟以上","v": "4"},
  458. {"n": "30~60分钟","v": "3"},
  459. {"n": "10~30分钟","v": "2"},
  460. {"n": "10分钟以下","v": "1"}]}],
  461. "高三化学": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高三化学"},
  462. {"n": "沪教版","v": "沪教版高三化学"},
  463. {"n": "人教版","v": "人教版高三化学"},
  464. {"n": "北师大版","v": "北师大版高三化学"},
  465. {"n": "苏教版","v": "苏教版高三化学"}]},
  466. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  467. {"n": "60分钟以上","v": "4"},
  468. {"n": "30~60分钟","v": "3"},
  469. {"n": "10~30分钟","v": "2"},
  470. {"n": "10分钟以下","v": "1"}]}],
  471. "高三物理": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高三物理"},
  472. {"n": "沪教版","v": "沪教版高三物理"},
  473. {"n": "人教版","v": "人教版高三物理"},
  474. {"n": "北师大版","v": "北师大版高三物理"},
  475. {"n": "苏教版","v": "苏教版高三物理"}]},
  476. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  477. {"n": "60分钟以上","v": "4"},
  478. {"n": "30~60分钟","v": "3"},
  479. {"n": "10~30分钟","v": "2"},
  480. {"n": "10分钟以下","v": "1"}]}],
  481. "高三生物": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高三生物"},
  482. {"n": "沪教版","v": "沪教版高三生物"},
  483. {"n": "人教版","v": "人教版高三生物"},
  484. {"n": "北师大版","v": "北师大版高三生物"},
  485. {"n": "苏教版","v": "苏教版高三生物"}]},
  486. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  487. {"n": "60分钟以上","v": "4"},
  488. {"n": "30~60分钟","v": "3"},
  489. {"n": "10~30分钟","v": "2"},
  490. {"n": "10分钟以下","v": "1"}]}],
  491. "高三地理": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高三地理"},
  492. {"n": "沪教版","v": "沪教版高三地理"},
  493. {"n": "人教版","v": "人教版高三地理"},
  494. {"n": "北师大版","v": "北师大版高三地理"},
  495. {"n": "苏教版","v": "苏教版高三地理"}]},
  496. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  497. {"n": "60分钟以上","v": "4"},
  498. {"n": "30~60分钟","v": "3"},
  499. {"n": "10~30分钟","v": "2"},
  500. {"n": "10分钟以下","v": "1"}]}],
  501. "高三历史": [{"key": "tid","name": "分类","value": [{"n": "全部","v": "高三历史"},
  502. {"n": "沪教版","v": "沪教版高三历史"},
  503. {"n": "人教版","v": "人教版高三历史"},
  504. {"n": "北师大版","v": "北师大版高三历史"},
  505. {"n": "苏教版","v": "苏教版高三历史"}]},
  506. {"key": "duration","name": "时长","value": [{"n": "全部","v": "0"},
  507. {"n": "60分钟以上","v": "4"},
  508. {"n": "30~60分钟","v": "3"},
  509. {"n": "10~30分钟","v": "2"},
  510. {"n": "10分钟以下","v": "1"}]}]
  511. }
  512. }
  513. header = {}
  514. def localProxy(self,param):
  515. return [200, "video/MP2T", action, ""]