2
0

py_bilibili2.py 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  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 __init__(self):
  11. #初始化,获取收藏夹分区,获取userid
  12. self.userid = self.get_userid()
  13. url = 'http://api.bilibili.com/x/v3/fav/folder/created/list-all?up_mid=%s&jsonp=jsonp' % (self.userid)
  14. rsp = self.fetch(url, cookies=self.getCookie())
  15. content = rsp.text
  16. jo = json.loads(content)
  17. fav_list=[]
  18. if jo['code'] == 0:
  19. for fav in jo['data'].get('list'):
  20. fav_dict = {'n':fav['title'] ,'v':fav['id']}
  21. fav_list.append(fav_dict)
  22. if self.config["filter"].get('收藏夹'):
  23. for i in self.config["filter"].get('收藏夹'):
  24. if i['key']=='mlid':
  25. i['value']=fav_list
  26. #用户userid
  27. userid=''
  28. def get_userid(self):
  29. #获取自己的userid(cookies拥有者)
  30. url = 'http://api.bilibili.com/x/space/myinfo'
  31. rsp = self.fetch(url, cookies=self.getCookie())
  32. content = rsp.text
  33. jo = json.loads(content)
  34. if jo['code'] == 0:
  35. return jo['data']['mid']
  36. def getName(self):
  37. return "哔哩哔哩"
  38. def init(self,extend=""):
  39. print("============{0}============".format(extend))
  40. pass
  41. def isVideoFormat(self,url):
  42. pass
  43. def manualVideoCheck(self):
  44. pass
  45. def homeContent(self,filter):
  46. result = {}
  47. cateManual = {
  48. "动态":"动态",
  49. "热门":"热门",
  50. "排行榜":"排行榜",
  51. "频道":"频道",
  52. "历史记录":"历史记录",
  53. "收藏夹": '收藏夹',
  54. "zane妈":"zane妈",
  55. "相声小品": "相声小品",
  56. "林芊妤":"林芊妤",
  57. "Zard": "Zard",
  58. "玩具汽车": "玩具汽车",
  59. "儿童": "儿童",
  60. "幼儿": "幼儿",
  61. "儿童玩具": "儿童玩具",
  62. "昆虫": "昆虫",
  63. "动物世界": "动物世界",
  64. "纪录片": "纪录片",
  65. "搞笑": "搞笑",
  66. "假窗-白噪音": "窗+白噪音",
  67. "演唱会": "演唱会"
  68. }
  69. classes = []
  70. for k in cateManual:
  71. classes.append({
  72. 'type_name':k,
  73. 'type_id':cateManual[k]
  74. })
  75. result['class'] = classes
  76. if(filter):
  77. result['filters'] = self.config['filter']
  78. return result
  79. def homeVideoContent(self):
  80. result = {
  81. 'list':[]
  82. }
  83. return result
  84. cookies = ''
  85. def getCookie(self):
  86. import requests
  87. import http.cookies
  88. ### 这里加cookie
  89. raw_cookie_line = "_uuid=410EE2CEC-ADA4-9AB6-E259-21714EB65B11095158infoc; buvid3=D2C34CF2-6477-AB89-6311-7A238568957195576infoc; b_nut=1667870895; buvid4=4D6335BC-498A-C88E-EB87-A5CC5B771BB795576-022110809-PZe5YmhE95rj0NUMn8rXOw%3D%3D; fingerprint=9ea566a1c49f6dbc3e4cd0fa2565d9e6; buvid_fp_plain=undefined; SESSDATA=a78d4f8f%2C1683422957%2C701df%2Ab2; bili_jct=0572eca27e88ddae2b9333352ccdfdea; DedeUserID=40142097; DedeUserID__ckMd5=d7d2a455ec709713; sid=6j83rpm6; buvid_fp=9ea566a1c49f6dbc3e4cd0fa2565d9e6; PVID=1"
  90. simple_cookie = http.cookies.SimpleCookie(raw_cookie_line)
  91. cookie_jar = requests.cookies.RequestsCookieJar()
  92. cookie_jar.update(simple_cookie)
  93. return cookie_jar
  94. def get_dynamic(self,pg):
  95. result = {}
  96. if int(pg) > 1:
  97. return result
  98. offset = ''
  99. videos = []
  100. for i in range(0,10):
  101. url= 'https://api.bilibili.com/x/polymer/web-dynamic/v1/feed/all?timezone_offset=-480&type=all&page={0}&offset={1}'.format(pg,offset)
  102. rsp = self.fetch(url,cookies=self.getCookie())
  103. content = rsp.text
  104. jo = json.loads(content)
  105. if jo['code'] == 0:
  106. offset = jo['data']['offset']
  107. vodList = jo['data']['items']
  108. for vod in vodList:
  109. if vod['type'] == 'DYNAMIC_TYPE_AV':
  110. ivod = vod['modules']['module_dynamic']['major']['archive']
  111. aid = str(ivod['aid']).strip()
  112. title = ivod['title'].strip().replace("<em class=\"keyword\">","").replace("</em>","")
  113. img = ivod['cover'].strip()
  114. remark = str(ivod['duration_text']).strip()
  115. videos.append({
  116. "vod_id":aid,
  117. "vod_name":title,
  118. "vod_pic":img,
  119. "vod_remarks":remark
  120. })
  121. result['list'] = videos
  122. result['page'] = pg
  123. result['pagecount'] = 9999
  124. result['limit'] = 90
  125. result['total'] = 999999
  126. return result
  127. def second_to_time(self,a):
  128. #将秒数转化为 时分秒的格式
  129. if a < 3600:
  130. return time.strftime("%M:%S", time.gmtime(a))
  131. else:
  132. return time.strftime("%H:%M:%S", time.gmtime(a))
  133. def get_history(self,pg):
  134. result = {}
  135. url = 'http://api.bilibili.com/x/v2/history?pn=%s' % pg
  136. rsp = self.fetch(url,cookies=self.getCookie())
  137. content = rsp.text
  138. jo = json.loads(content) #解析api接口,转化成json数据对象
  139. if jo['code'] == 0:
  140. videos = []
  141. vodList = jo['data']
  142. for vod in vodList:
  143. if vod['duration'] > 0: #筛选掉非视频的历史记录
  144. aid = str(vod["aid"]).strip() #获取 aid
  145. #获取标题
  146. title = vod["title"].replace("<em class=\"keyword\">", "").replace("</em>", "").replace("&quot;",
  147. '"')
  148. #封面图片
  149. img = vod["pic"].strip()
  150. #获取已观看时间
  151. if str(vod['progress'])=='-1':
  152. process=str(self.second_to_time(vod['duration'])).strip()
  153. else:
  154. process = str(self.second_to_time(vod['progress'])).strip()
  155. #获取视频总时长
  156. total_time= str(self.second_to_time(vod['duration'])).strip()
  157. #组合 已观看时间 / 总时长 ,赋值给 remark
  158. remark = process+' / '+total_time
  159. videos.append({
  160. "vod_id": aid,
  161. "vod_name": title,
  162. "vod_pic": img,
  163. "vod_remarks": remark
  164. })
  165. result['list'] = videos
  166. result['page'] = pg
  167. result['pagecount'] = 9999
  168. result['limit'] = 90
  169. result['total'] = 999999
  170. return result
  171. def get_hot(self,pg):
  172. result = {}
  173. url= 'https://api.bilibili.com/x/web-interface/popular?ps=20&pn={0}'.format(pg)
  174. rsp = self.fetch(url,cookies=self.getCookie())
  175. content = rsp.text
  176. jo = json.loads(content)
  177. if jo['code'] == 0:
  178. videos = []
  179. vodList = jo['data']['list']
  180. for vod in vodList:
  181. aid = str(vod['aid']).strip()
  182. title = vod['title'].strip().replace("<em class=\"keyword\">","").replace("</em>","")
  183. img = vod['pic'].strip()
  184. remark = str(vod['duration']).strip()
  185. videos.append({
  186. "vod_id":aid,
  187. "vod_name":title,
  188. "vod_pic":img,
  189. "vod_remarks":remark
  190. })
  191. result['list'] = videos
  192. result['page'] = pg
  193. result['pagecount'] = 9999
  194. result['limit'] = 90
  195. result['total'] = 999999
  196. return result
  197. def get_rank(self):
  198. result = {}
  199. url= 'https://api.bilibili.com/x/web-interface/ranking/v2?rid=0&type=all'
  200. rsp = self.fetch(url,cookies=self.getCookie())
  201. content = rsp.text
  202. jo = json.loads(content)
  203. if jo['code'] == 0:
  204. videos = []
  205. vodList = jo['data']['list']
  206. for vod in vodList:
  207. aid = str(vod['aid']).strip()
  208. title = vod['title'].strip().replace("<em class=\"keyword\">","").replace("</em>","")
  209. img = vod['pic'].strip()
  210. remark = str(vod['duration']).strip()
  211. videos.append({
  212. "vod_id":aid,
  213. "vod_name":title,
  214. "vod_pic":img,
  215. "vod_remarks":remark
  216. })
  217. result['list'] = videos
  218. result['page'] = 1
  219. result['pagecount'] = 1
  220. result['limit'] = 90
  221. result['total'] = 999999
  222. return result
  223. def get_channel(self,pg,cid):
  224. result = {}
  225. if int(pg) > 1:
  226. return result
  227. offset = ''
  228. videos = []
  229. for i in range(0,5):
  230. url= 'https://api.bilibili.com/x/web-interface/web/channel/multiple/list?channel_id={0}&sort_type=hot&offset={1}&page_size=30'.format(cid,offset)
  231. rsp = self.fetch(url,cookies=self.getCookie())
  232. content = rsp.text
  233. print(content)
  234. jo = json.loads(content)
  235. if jo['code'] == 0:
  236. offset = jo['data']['offset']
  237. vodList = jo['data']['list']
  238. for vod in vodList:
  239. if vod['card_type'] == 'rank':
  240. rankVods = vod['items']
  241. for ivod in rankVods:
  242. aid = str(ivod['id']).strip()
  243. title = ivod['name'].strip().replace("<em class=\"keyword\">","").replace("</em>","")
  244. img = ivod['cover'].strip()
  245. remark = str(ivod['duration']).strip()
  246. videos.append({
  247. "vod_id":aid,
  248. "vod_name":title,
  249. "vod_pic":img,
  250. "vod_remarks":remark
  251. })
  252. elif vod['card_type'] == 'archive':
  253. aid = str(vod['id']).strip()
  254. title = vod['name'].strip().replace("<em class=\"keyword\">","").replace("</em>","")
  255. img = vod['cover'].strip()
  256. remark = str(vod['duration']).strip()
  257. videos.append({
  258. "vod_id":aid,
  259. "vod_name":title,
  260. "vod_pic":img,
  261. "vod_remarks":remark
  262. })
  263. result['list'] = videos
  264. result['page'] = pg
  265. result['pagecount'] = 9999
  266. result['limit'] = 90
  267. result['total'] = 999999
  268. return result
  269. def get_fav_detail(self,pg,mlid,order):
  270. result = {}
  271. url = 'http://api.bilibili.com/x/v3/fav/resource/list?media_id=%s&order=%s&pn=%s&ps=20&platform=web&type=0'%(mlid,order,pg)
  272. rsp = self.fetch(url, cookies=self.getCookie())
  273. content = rsp.text
  274. jo = json.loads(content)
  275. videos = []
  276. vodList = jo['data']['medias']
  277. for vod in vodList:
  278. aid = str(vod['id']).strip()
  279. title = vod['title'].replace("<em class=\"keyword\">", "").replace("</em>", "").replace("&quot;", '"')
  280. img = vod['cover'].strip()
  281. remark = str( self.second_to_time(vod['duration'])).strip()
  282. videos.append({
  283. "vod_id": aid,
  284. "vod_name": title,
  285. "vod_pic": img,
  286. "vod_remarks": remark
  287. })
  288. #videos=self.filter_duration(videos, duration_diff)
  289. result['list'] = videos
  290. result['page'] = pg
  291. result['pagecount'] = 9999
  292. result['limit'] = 90
  293. result['total'] = 999999
  294. return result
  295. def get_fav(self,pg,order,extend):
  296. #获取自己的up_mid(也就是用户uid)
  297. mlid=''
  298. fav_config=self.config["filter"].get('收藏夹')
  299. #默认显示第一个收藏夹内容
  300. if fav_config:
  301. for i in fav_config:
  302. if i['key']=='mlid':
  303. if len(i['value'])>0:
  304. mlid=i['value'][0]['v']
  305. #print(self.config["filter"].get('收藏夹'))
  306. if 'mlid' in extend:
  307. mlid = extend['mlid']
  308. if mlid:
  309. return self.get_fav_detail(pg=pg,mlid=mlid,order=order)
  310. else:
  311. return {}
  312. def categoryContent(self,tid,pg,filter,extend):
  313. print(tid,pg,filter,extend)
  314. result = {}
  315. if tid == "热门":
  316. return self.get_hot(pg=pg)
  317. if tid == "排行榜" :
  318. return self.get_rank()
  319. if tid == '动态':
  320. return self.get_dynamic(pg=pg)
  321. if tid == '历史记录':
  322. return self.get_history(pg=pg)
  323. if tid == "收藏夹":
  324. self.box_video_type = '收藏夹'
  325. order = 'mtime'
  326. if 'order' in extend:
  327. order = extend['order']
  328. return self.get_fav(pg=pg, order=order,extend=extend)
  329. if tid == '频道':
  330. cid = '9222'
  331. if 'cid' in extend:
  332. cid = extend['cid']
  333. return self.get_channel(pg=pg,cid=cid)
  334. url = 'https://api.bilibili.com/x/web-interface/search/type?search_type=video&keyword={0}&page={1}'.format(tid,pg)
  335. if len(self.cookies) <= 0:
  336. self.getCookie()
  337. rsp = self.fetch(url,cookies=self.getCookie())
  338. content = rsp.text
  339. jo = json.loads(content)
  340. if jo['code'] != 0:
  341. rspRetry = self.fetch(url,cookies=self.getCookie())
  342. content = rspRetry.text
  343. jo = json.loads(content)
  344. videos = []
  345. vodList = jo['data']['result']
  346. for vod in vodList:
  347. aid = str(vod['aid']).strip()
  348. title = tid + ":" + vod['title'].strip().replace("<em class=\"keyword\">","").replace("</em>","")
  349. img = 'https:' + vod['pic'].strip()
  350. remark = str(vod['duration']).strip()
  351. videos.append({
  352. "vod_id":aid,
  353. "vod_name":title,
  354. "vod_pic":img,
  355. "vod_remarks":remark
  356. })
  357. result['list'] = videos
  358. result['page'] = pg
  359. result['pagecount'] = 9999
  360. result['limit'] = 90
  361. result['total'] = 999999
  362. return result
  363. def cleanSpace(self,str):
  364. return str.replace('\n','').replace('\t','').replace('\r','').replace(' ','')
  365. def detailContent(self,array):
  366. aid = array[0]
  367. url = "https://api.bilibili.com/x/web-interface/view?aid={0}".format(aid)
  368. rsp = self.fetch(url,headers=self.header,cookies=self.getCookie())
  369. jRoot = json.loads(rsp.text)
  370. jo = jRoot['data']
  371. title = jo['title'].replace("<em class=\"keyword\">","").replace("</em>","")
  372. pic = jo['pic']
  373. desc = jo['desc']
  374. typeName = jo['tname']
  375. vod = {
  376. "vod_id":aid,
  377. "vod_name":title,
  378. "vod_pic":pic,
  379. "type_name":typeName,
  380. "vod_year":"",
  381. "vod_area":"bilidanmu",
  382. "vod_remarks":"",
  383. "vod_actor":jo['owner']['name'],
  384. "vod_director":jo['owner']['name'],
  385. "vod_content":desc
  386. }
  387. ja = jo['pages']
  388. playUrl = ''
  389. for tmpJo in ja:
  390. cid = tmpJo['cid']
  391. part = tmpJo['part']
  392. playUrl = playUrl + '{0}${1}_{2}#'.format(part,aid,cid)
  393. vod['vod_play_from'] = 'B站'
  394. vod['vod_play_url'] = playUrl
  395. result = {
  396. 'list':[
  397. vod
  398. ]
  399. }
  400. return result
  401. def searchContent(self,key,quick):
  402. search = self.categoryContent(tid=key,pg=1,filter=None,extend=None)
  403. result = {
  404. 'list':search['list']
  405. }
  406. return result
  407. def playerContent(self,flag,id,vipFlags):
  408. # https://www.555dianying.cc/vodplay/static/js/playerconfig.js
  409. result = {}
  410. ids = id.split("_")
  411. url = 'https://api.bilibili.com:443/x/player/playurl?avid={0}&cid=%20%20{1}&qn=112'.format(ids[0],ids[1])
  412. rsp = self.fetch(url,cookies=self.getCookie())
  413. jRoot = json.loads(rsp.text)
  414. jo = jRoot['data']
  415. ja = jo['durl']
  416. maxSize = -1
  417. position = -1
  418. for i in range(len(ja)):
  419. tmpJo = ja[i]
  420. if maxSize < int(tmpJo['size']):
  421. maxSize = int(tmpJo['size'])
  422. position = i
  423. url = ''
  424. if len(ja) > 0:
  425. if position == -1:
  426. position = 0
  427. url = ja[position]['url']
  428. result["parse"] = 0
  429. result["playUrl"] = ''
  430. result["url"] = url
  431. result["header"] = {
  432. "Referer":"https://www.bilibili.com",
  433. "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"
  434. }
  435. result["contentType"] = 'video/x-flv'
  436. return result
  437. config = {
  438. "player": {},
  439. "filter": {"收藏夹": [{
  440. "key": "order",
  441. "name": "排序",
  442. "value": [
  443. {
  444. "n": "收藏时间",
  445. "v": "mtime"
  446. },
  447. {
  448. "n": "播放量",
  449. "v": "view"
  450. },
  451. {
  452. "n": "投稿时间",
  453. "v": "pubtime"
  454. }
  455. ]
  456. },
  457. {
  458. "key": "mlid",
  459. "name": "收藏夹分区",
  460. "value": [
  461. ]
  462. }],
  463. "频道":[{"key":"cid","name":"分类","value":[{'n': '搞笑', 'v': 1833}, {'n': '美食', 'v': 20215}, {'n': '鬼畜', 'v': 68}, {'n': '天官赐福', 'v': 2544632}, {'n': '英雄联盟', 'v': 9222}, {'n': '美妆', 'v': 832569}, {'n': '必剪创作', 'v': 15775524}, {'n': '单机游戏', 'v': 17683}, {'n': '搞笑', 'v': 1833}, {'n': '科普', 'v': 5417}, {'n': '影视剪辑', 'v': 318570}, {'n': 'vlog', 'v': 2511282}, {'n': '声优', 'v': 1645}, {'n': '动漫杂谈', 'v': 530918}, {'n': 'COSPLAY', 'v': 88}, {'n': '漫展', 'v': 22551}, {'n': 'MAD', 'v': 281}, {'n': '手书', 'v': 608}, {'n': '英雄联盟', 'v': 9222}, {'n': '王者荣耀', 'v': 1404375}, {'n': '单机游戏', 'v': 17683}, {'n': '我的世界', 'v': 47988}, {'n': '守望先锋', 'v': 926988}, {'n': '恐怖游戏', 'v': 17941}, {'n': '英雄联盟', 'v': 9222}, {'n': '王者荣耀', 'v': 1404375}, {'n': '守望先锋', 'v': 926988}, {'n': '炉石传说', 'v': 318756}, {'n': 'DOTA2', 'v': 47034}, {'n': 'CS:GO', 'v': 99842}, {'n': '鬼畜', 'v': 68}, {'n': '鬼畜调教', 'v': 497221}, {'n': '诸葛亮', 'v': 51330}, {'n': '二次元鬼畜', 'v': 29415}, {'n': '王司徒', 'v': 987568}, {'n': '万恶之源', 'v': 21}, {'n': '美妆', 'v': 832569}, {'n': '服饰', 'v': 313718}, {'n': '减肥', 'v': 20805}, {'n': '穿搭', 'v': 1139735}, {'n': '发型', 'v': 13896}, {'n': '化妆教程', 'v': 261355}, {'n': '电音', 'v': 14426}, {'n': '欧美音乐', 'v': 17034}, {'n': '中文翻唱', 'v': 8043}, {'n': '洛天依', 'v': 8564}, {'n': '翻唱', 'v': 386}, {'n': '日文翻唱', 'v': 85689}, {'n': '科普', 'v': 5417}, {'n': '技术宅', 'v': 368}, {'n': '历史', 'v': 221}, {'n': '科学', 'v': 1364}, {'n': '人文', 'v': 40737}, {'n': '科幻', 'v': 5251}, {'n': '手机', 'v': 7007}, {'n': '手机评测', 'v': 143751}, {'n': '电脑', 'v': 1339}, {'n': '摄影', 'v': 25450}, {'n': '笔记本', 'v': 1338}, {'n': '装机', 'v': 413678}, {'n': '课堂教育', 'v': 3233375}, {'n': '公开课', 'v': 31864}, {'n': '演讲', 'v': 2739}, {'n': 'PS教程', 'v': 335752}, {'n': '编程', 'v': 28784}, {'n': '英语学习', 'v': 360005}, {'n': '喵星人', 'v': 1562}, {'n': '萌宠', 'v': 6943}, {'n': '汪星人', 'v': 9955}, {'n': '大熊猫', 'v': 22919}, {'n': '柴犬', 'v': 30239}, {'n': '吱星人', 'v': 6947}, {'n': '美食', 'v': 20215}, {'n': '甜点', 'v': 35505}, {'n': '吃货', 'v': 6942}, {'n': '厨艺', 'v': 239855}, {'n': '烘焙', 'v': 218245}, {'n': '街头美食', 'v': 1139423}, {'n': 'A.I.Channel', 'v': 3232987}, {'n': '虚拟UP主', 'v': 4429874}, {'n': '神楽めあ', 'v': 7562902}, {'n': '白上吹雪', 'v': 7355391}, {'n': '彩虹社', 'v': 1099778}, {'n': 'hololive', 'v': 8751822}, {'n': 'EXO', 'v': 191032}, {'n': '防弹少年团', 'v': 536395}, {'n': '肖战', 'v': 1450880}, {'n': '王一博', 'v': 902215}, {'n': '易烊千玺', 'v': 15186}, {'n': 'BLACKPINK', 'v': 1749296}, {'n': '宅舞', 'v': 9500}, {'n': '街舞', 'v': 5574}, {'n': '舞蹈教学', 'v': 157087}, {'n': '明星舞蹈', 'v': 6012204}, {'n': '韩舞', 'v': 159571}, {'n': '古典舞', 'v': 161247}, {'n': '旅游', 'v': 6572}, {'n': '绘画', 'v': 2800}, {'n': '手工', 'v': 11265}, {'n': 'vlog', 'v': 2511282}, {'n': 'DIY', 'v': 3620}, {'n': '手绘', 'v': 1210}, {'n': '综艺', 'v': 11687}, {'n': '国家宝藏', 'v': 105286}, {'n': '脱口秀', 'v': 4346}, {'n': '日本综艺', 'v': 81265}, {'n': '国内综艺', 'v': 641033}, {'n': '人类观察', 'v': 282453}, {'n': '影评', 'v': 111377}, {'n': '电影解说', 'v': 1161117}, {'n': '影视混剪', 'v': 882598}, {'n': '影视剪辑', 'v': 318570}, {'n': '漫威', 'v': 138600}, {'n': '超级英雄', 'v': 13881}, {'n': '影视混剪', 'v': 882598}, {'n': '影视剪辑', 'v': 318570}, {'n': '诸葛亮', 'v': 51330}, {'n': '韩剧', 'v': 53056}, {'n': '王司徒', 'v': 987568}, {'n': '泰剧', 'v': 179103}, {'n': '郭德纲', 'v': 8892}, {'n': '相声', 'v': 5783}, {'n': '张云雷', 'v': 1093613}, {'n': '秦霄贤', 'v': 3327368}, {'n': '孟鹤堂', 'v': 1482612}, {'n': '岳云鹏', 'v': 24467}, {'n': '假面骑士', 'v': 2069}, {'n': '特摄', 'v': 2947}, {'n': '奥特曼', 'v': 963}, {'n': '迪迦奥特曼', 'v': 13784}, {'n': '超级战队', 'v': 32881}, {'n': '铠甲勇士', 'v': 11564}, {'n': '健身', 'v': 4344}, {'n': '篮球', 'v': 1265}, {'n': '体育', 'v': 41103}, {'n': '帕梅拉', 'v': 257412}, {'n': '极限运动', 'v': 8876}, {'n': '足球', 'v': 584}, {'n': '星海', 'v': 178862}, {'n': '张召忠', 'v': 116480}, {'n': '航母', 'v': 57834}, {'n': '航天', 'v': 81618}, {'n': '导弹', 'v': 14958}, {'n': '战斗机', 'v': 24304}]}]}
  464. }
  465. header = {}
  466. def localProxy(self,param):
  467. return [200, "video/MP2T", action, ""]
  468. if __name__ == '__main__':
  469. a=Spider()
  470. print(a.get_fav(pg='1',order='mtime',extend={}))