From 70beb89c94e5182681cb12d82d71c5bfef49a9c3 Mon Sep 17 00:00:00 2001 From: qcfree <6529067+qcfree@user.noreply.gitee.com> Date: Sun, 6 Aug 2023 13:00:07 +0000 Subject: [PATCH] 1 Signed-off-by: qcfree <6529067+qcfree@user.noreply.gitee.com> --- py/plugin/py_cctvxw.json | 156 +++++++++++++++++++++++ py/plugin/py_cctvyy.json | 159 +++++++++++++++++++++++ py/plugin/py_cctvzh.json | 160 ++++++++++++++++++++++++ py/plugin/py_cctvzy.json | 178 ++++++++++++++++++++++++++ py/plugin/py_cokemv.json | 242 +++++++++++++++++++++++++++++++++++ py/plugin/py_cokemv_1.json | 242 +++++++++++++++++++++++++++++++++++ py/plugin/py_cyys.json | 216 ++++++++++++++++++++++++++++++++ py/plugin/py_czspp.json | 244 ++++++++++++++++++++++++++++++++++++ py/plugin/py_douban.json | 128 +++++++++++++++++++ py/plugin/py_douyu.json | 147 ++++++++++++++++++++++ py/plugin/py_freezb.json | 161 ++++++++++++++++++++++++ py/plugin/py_genmov.json | 202 ++++++++++++++++++++++++++++++ py/plugin/py_genmov_1.json | 202 ++++++++++++++++++++++++++++++ py/plugin/py_gimytv.json | 216 ++++++++++++++++++++++++++++++++ py/plugin/py_gitcafe.py | 136 ++++++++++++++++++++ py/plugin/py_huya.json | 185 +++++++++++++++++++++++++++ py/plugin/py_if101.json | 86 +++++++++++++ py/plugin/py_jrskbs.json | 166 +++++++++++++++++++++++++ py/plugin/py_koudaiys.json | 249 +++++++++++++++++++++++++++++++++++++ py/plugin/py_kuaikan.json | 105 ++++++++++++++++ 20 files changed, 3580 insertions(+) create mode 100644 py/plugin/py_cctvxw.json create mode 100644 py/plugin/py_cctvyy.json create mode 100644 py/plugin/py_cctvzh.json create mode 100644 py/plugin/py_cctvzy.json create mode 100644 py/plugin/py_cokemv.json create mode 100644 py/plugin/py_cokemv_1.json create mode 100644 py/plugin/py_cyys.json create mode 100644 py/plugin/py_czspp.json create mode 100644 py/plugin/py_douban.json create mode 100644 py/plugin/py_douyu.json create mode 100644 py/plugin/py_freezb.json create mode 100644 py/plugin/py_genmov.json create mode 100644 py/plugin/py_genmov_1.json create mode 100644 py/plugin/py_gimytv.json create mode 100644 py/plugin/py_gitcafe.py create mode 100644 py/plugin/py_huya.json create mode 100644 py/plugin/py_if101.json create mode 100644 py/plugin/py_jrskbs.json create mode 100644 py/plugin/py_koudaiys.json create mode 100644 py/plugin/py_kuaikan.json diff --git a/py/plugin/py_cctvxw.json b/py/plugin/py_cctvxw.json new file mode 100644 index 0000000..b02fdf6 --- /dev/null +++ b/py/plugin/py_cctvxw.json @@ -0,0 +1,156 @@ +#coding=utf-8 +#!/usr/bin/python +import sys +sys.path.append('..') +from base.spider import Spider +import json +import time +import base64 + +class Spider(Spider): # 元类 默认的元类 type + def getName(self): + return "央视新闻" + def init(self,extend=""): + print("============{0}============".format(extend)) + pass + def isVideoFormat(self,url): + pass + def manualVideoCheck(self): + pass + def homeContent(self,filter): + result = {} + cateManual = { + "华人世界":"TOPC1451539822927345", +"海峡两岸":"TOPC1451540328102649", +"今日关注":"TOPC1451540389082713", +"中国新闻":"TOPC1451539894330405", +"今日亚洲":"TOPC1451540448405749", +"朝闻天下":"TOPC1451558496100826", +"新闻直播间":"TOPC1451559129520755", +"新闻30分":"TOPC1451559097947700", +"共同关注":"TOPC1451558858788377", +"东方时空":"TOPC1451558532019883", +"新闻1+1":"TOPC1451559066181661", +"今日环球":"TOPC1571034705435323", +"华人故事":"TOPC1571646754621556", +"鲁健访谈":"TOPC1609904361007481", +"深度国际":"TOPC1451540709098112", +"国际时讯":"TOPC1451558887804404", +"环球视线":"TOPC1451558926200436", +"24小时":"TOPC1451558428005729", +"午夜新闻":"TOPC1451558779639282", +"新闻调查":"TOPC1451558819463311", +"新闻周刊":"TOPC1451559180488841", +"世界周刊":"TOPC1451558687534149", +"面对面":"TOPC1451559038345600", +"每周质量报告":"TOPC1451558650605123", +"华人世界":"TOPC1451539822927345" + } + classes = [] + for k in cateManual: + classes.append({ + 'type_name':k, + 'type_id':cateManual[k] + }) + result['class'] = classes + if(filter): + result['filters'] = self.config['filter'] + return result + def homeVideoContent(self): + result = { + 'list':[] + } + return result + def categoryContent(self,tid,pg,filter,extend): + result = {} + extend['id'] = tid + extend['p'] = pg + filterParams = ["id", "p", "d"] + params = ["", "", ""] + for idx in range(len(filterParams)): + fp = filterParams[idx] + if fp in extend.keys(): + params[idx] = '{0}={1}'.format(filterParams[idx],extend[fp]) + suffix = '&'.join(params) + url = 'https://api.cntv.cn/NewVideo/getVideoListByColumn?{0}&n=20&sort=desc&mode=0&serviceId=tvcctv&t=json'.format(suffix) + if not tid.startswith('TOPC'): + url = 'https://api.cntv.cn/NewVideo/getVideoListByAlbumIdNew?{0}&n=20&sort=desc&mode=0&serviceId=tvcctv&t=json'.format(suffix) + rsp = self.fetch(url,headers=self.header) + jo = json.loads(rsp.text) + vodList = jo['data']['list'] + videos = [] + for vod in vodList: + guid = vod['guid'] + title = vod['title'] + img = vod['image'] + brief = vod['brief'] + videos.append({ + "vod_id":guid+"###"+img, + "vod_name":title, + "vod_pic":img, + "vod_remarks":'' + }) + result['list'] = videos + result['page'] = pg + result['pagecount'] = 9999 + result['limit'] = 90 + result['total'] = 999999 + return result + def detailContent(self,array): + aid = array[0].split('###') + tid = aid[0] + url = "https://vdn.apps.cntv.cn/api/getHttpVideoInfo.do?pid={0}".format(tid) + + rsp = self.fetch(url,headers=self.header) + jo = json.loads(rsp.text) + title = jo['title'].strip() + link = jo['hls_url'].strip() + vod = { + "vod_id":tid, + "vod_name":title, + "vod_pic":aid[1], + "type_name":'', + "vod_year":"", + "vod_area":"", + "vod_remarks":"", + "vod_actor":"", + "vod_director":"", + "vod_content":"" + } + vod['vod_play_from'] = 'CCTV' + vod['vod_play_url'] = title+"$"+link + + result = { + 'list':[ + vod + ] + } + return result + def searchContent(self,key,quick): + result = { + 'list':[] + } + return result + def playerContent(self,flag,id,vipFlags): + result = {} + rsp = self.fetch(id,headers=self.header) + content = rsp.text.strip() + arr = content.split('\n') + urlPrefix = self.regStr(id,'(http[s]?://[a-zA-z0-9.]+)/') + url = urlPrefix + arr[-1] + result["parse"] = 0 + result["playUrl"] = '' + result["url"] = url + result["header"] = '' + return result + + config = { + "player": {}, + "filter": {"TOPC1451557970755294": [{"key": "d", "name": "年份", "value": [{"n": "全部", "v": ""}, {"n": "2021", "v": "2021"}, {"n": "2020", "v": "2020"}, {"n": "2019", "v": "2019"}, {"n": "2018", "v": "2018"}, {"n": "2017", "v": "2017"}, {"n": "2016", "v": "2016"}, {"n": "2015", "v": "2015"}, {"n": "2014", "v": "2014"}, {"n": "2013", "v": "2013"}, {"n": "2012", "v": "2012"}, {"n": "2011", "v": "2011"}, {"n": "2010", "v": "2010"}, {"n": "2009", "v": "2009"}]}]} + } + header = { + "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.54 Safari/537.36" + } + + def localProxy(self,param): + return [200, "video/MP2T", action, ""] diff --git a/py/plugin/py_cctvyy.json b/py/plugin/py_cctvyy.json new file mode 100644 index 0000000..949ce2e --- /dev/null +++ b/py/plugin/py_cctvyy.json @@ -0,0 +1,159 @@ +#coding=utf-8 +#!/usr/bin/python +import sys +sys.path.append('..') +from base.spider import Spider +import json +import time +import base64 + +class Spider(Spider): # 元类 默认的元类 type + def getName(self): + return "央视音乐" + def init(self,extend=""): + print("============{0}============".format(extend)) + pass + def isVideoFormat(self,url): + pass + def manualVideoCheck(self): + pass + def homeContent(self,filter): + result = {} + cateManual = { + "乐享汇":"TOPC1528430065133683", +"国际艺苑":"TOPC1451379250581117", +"中国音乐电视":"TOPC1451542397206110", +"精彩音乐汇":"TOPC1451541414450906", +"童声唱":"TOPC1570593464032566", +"民歌·中国":"TOPC1451541994820527", +"CCTV音乐厅":"TOPC1451534421925242", +"影视留声机":"TOPC1451542346007956", +"音乐人生":"TOPC1451542308412911", +"一起音乐吧":"TOPC1451542132455743", +"音乐公开课":"TOPC1462849800640766", +"乐游天下":"TOPC1451541538046196", +"中国节拍":"TOPC1570025984977611", +"聆听时刻":"TOPC1570026397101703", +"音乐周刊":"TOPC1570593186033488", +"合唱先锋":"TOPC1570026172793162", +"巅峰音乐汇":"TOPC1451984095463376", +"曲苑杂坛":"TOPC1451984417763860", +"星光舞台":"TOPC1451542099519708", +"百年歌声":"TOPC1451534465694290", +"音乐传奇":"TOPC1451542222069826", +"音乐告诉你":"TOPC1451542273313866", +"广场舞金曲":"TOPC1528685010104859", +"快乐琴童":"TOPC1451541450128978", +"歌声与微笑":"TOPC1451541189657627", +"今乐坛":"TOPC1451541229451689", +"乡村大舞台":"TOPC1563179546003162", +"印象·乡村":"TOPC1563178734372977" + } + classes = [] + for k in cateManual: + classes.append({ + 'type_name':k, + 'type_id':cateManual[k] + }) + result['class'] = classes + if(filter): + result['filters'] = self.config['filter'] + return result + def homeVideoContent(self): + result = { + 'list':[] + } + return result + def categoryContent(self,tid,pg,filter,extend): + result = {} + extend['id'] = tid + extend['p'] = pg + filterParams = ["id", "p", "d"] + params = ["", "", ""] + for idx in range(len(filterParams)): + fp = filterParams[idx] + if fp in extend.keys(): + params[idx] = '{0}={1}'.format(filterParams[idx],extend[fp]) + suffix = '&'.join(params) + url = 'https://api.cntv.cn/NewVideo/getVideoListByColumn?{0}&n=20&sort=desc&mode=0&serviceId=tvcctv&t=json'.format(suffix) + if not tid.startswith('TOPC'): + url = 'https://api.cntv.cn/NewVideo/getVideoListByAlbumIdNew?{0}&n=20&sort=desc&mode=0&serviceId=tvcctv&t=json'.format(suffix) + rsp = self.fetch(url,headers=self.header) + jo = json.loads(rsp.text) + vodList = jo['data']['list'] + videos = [] + for vod in vodList: + guid = vod['guid'] + title = vod['title'] + img = vod['image'] + brief = vod['brief'] + videos.append({ + "vod_id":guid+"###"+img, + "vod_name":title, + "vod_pic":img, + "vod_remarks":'' + }) + result['list'] = videos + result['page'] = pg + result['pagecount'] = 9999 + result['limit'] = 90 + result['total'] = 999999 + return result + def detailContent(self,array): + aid = array[0].split('###') + tid = aid[0] + url = "https://vdn.apps.cntv.cn/api/getHttpVideoInfo.do?pid={0}".format(tid) + + rsp = self.fetch(url,headers=self.header) + jo = json.loads(rsp.text) + title = jo['title'].strip() + link = jo['hls_url'].strip() + vod = { + "vod_id":tid, + "vod_name":title, + "vod_pic":aid[1], + "type_name":'', + "vod_year":"", + "vod_area":"", + "vod_remarks":"", + "vod_actor":"", + "vod_director":"", + "vod_content":"" + } + vod['vod_play_from'] = 'CCTV' + vod['vod_play_url'] = title+"$"+link + + result = { + 'list':[ + vod + ] + } + return result + def searchContent(self,key,quick): + result = { + 'list':[] + } + return result + def playerContent(self,flag,id,vipFlags): + result = {} + rsp = self.fetch(id,headers=self.header) + content = rsp.text.strip() + arr = content.split('\n') + urlPrefix = self.regStr(id,'(http[s]?://[a-zA-z0-9.]+)/') + url = urlPrefix + arr[-1] + result["parse"] = 0 + result["playUrl"] = '' + result["url"] = url + result["header"] = '' + return result + + config = { + "player": {}, + "filter": {"TOPC1451557970755294": [{"key": "d", "name": "年份", "value": [{"n": "全部", "v": ""}, {"n": "2021", "v": "2021"}, {"n": "2020", "v": "2020"}, {"n": "2019", "v": "2019"}, {"n": "2018", "v": "2018"}, {"n": "2017", "v": "2017"}, {"n": "2016", "v": "2016"}, {"n": "2015", "v": "2015"}, {"n": "2014", "v": "2014"}, {"n": "2013", "v": "2013"}, {"n": "2012", "v": "2012"}, {"n": "2011", "v": "2011"}, {"n": "2010", "v": "2010"}, {"n": "2009", "v": "2009"}]}]} + } + header = { + "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.54 Safari/537.36" + } + + def localProxy(self,param): + return [200, "video/MP2T", action, ""] diff --git a/py/plugin/py_cctvzh.json b/py/plugin/py_cctvzh.json new file mode 100644 index 0000000..5e3a476 --- /dev/null +++ b/py/plugin/py_cctvzh.json @@ -0,0 +1,160 @@ +#coding=utf-8 +#!/usr/bin/python +import sys +sys.path.append('..') +from base.spider import Spider +import json +import time +import base64 + +class Spider(Spider): # 元类 默认的元类 type + def getName(self): + return "央视综合" + def init(self,extend=""): + print("============{0}============".format(extend)) + pass + def isVideoFormat(self,url): + pass + def manualVideoCheck(self): + pass + def homeContent(self,filter): + result = {} + cateManual = { + "中国缘":"TOPC1571646819318596", +"见证":"TOPC1451542933238628", + +"我有传家宝":"TOPC1451525396109388", +"天下财经":"TOPC1451531385787654", +"正点财经":"TOPC1453100395512779", +"收藏传奇":"TOPC1451526640730841", +"分秒必争":"TOPC1451379074008632", +"记住乡愁第八季":"TOPC1640330887412898", + +"动画城":"TOPC1451542209144770", +"动漫世界":"TOPC1451559448233349", +"周末动画片":"TOPC1451559836238828", +"快乐驿站":"TOPC1451542273075862", +"动画城":"TOPC1451542209144770", +"动漫星空":"TOPC1451559936284927", +"动画剧场":"TOPC1451559414465320", + +"走遍中国":"TOPC1451542134053698", +"生活提示":"TOPC1451526037568184", +"人口":"TOPC1451466072378425", +"生活圈":"TOPC1451546588784893", +"是真的吗":"TOPC1451534366388377", +"生活家":"TOPC1593419181674791", +"远方的家":"TOPC1451541349400938", +"美食中国":"TOPC1571034804976375", +"味道":"TOPC1482483166133803", +"生活早参考":"TOPC1451525302140236", +"走遍中国":"TOPC1451542134053698" + } + classes = [] + for k in cateManual: + classes.append({ + 'type_name':k, + 'type_id':cateManual[k] + }) + result['class'] = classes + if(filter): + result['filters'] = self.config['filter'] + return result + def homeVideoContent(self): + result = { + 'list':[] + } + return result + def categoryContent(self,tid,pg,filter,extend): + result = {} + extend['id'] = tid + extend['p'] = pg + filterParams = ["id", "p", "d"] + params = ["", "", ""] + for idx in range(len(filterParams)): + fp = filterParams[idx] + if fp in extend.keys(): + params[idx] = '{0}={1}'.format(filterParams[idx],extend[fp]) + suffix = '&'.join(params) + url = 'https://api.cntv.cn/NewVideo/getVideoListByColumn?{0}&n=20&sort=desc&mode=0&serviceId=tvcctv&t=json'.format(suffix) + if not tid.startswith('TOPC'): + url = 'https://api.cntv.cn/NewVideo/getVideoListByAlbumIdNew?{0}&n=20&sort=desc&mode=0&serviceId=tvcctv&t=json'.format(suffix) + rsp = self.fetch(url,headers=self.header) + jo = json.loads(rsp.text) + vodList = jo['data']['list'] + videos = [] + for vod in vodList: + guid = vod['guid'] + title = vod['title'] + img = vod['image'] + brief = vod['brief'] + videos.append({ + "vod_id":guid+"###"+img, + "vod_name":title, + "vod_pic":img, + "vod_remarks":'' + }) + result['list'] = videos + result['page'] = pg + result['pagecount'] = 9999 + result['limit'] = 90 + result['total'] = 999999 + return result + def detailContent(self,array): + aid = array[0].split('###') + tid = aid[0] + url = "https://vdn.apps.cntv.cn/api/getHttpVideoInfo.do?pid={0}".format(tid) + + rsp = self.fetch(url,headers=self.header) + jo = json.loads(rsp.text) + title = jo['title'].strip() + link = jo['hls_url'].strip() + vod = { + "vod_id":tid, + "vod_name":title, + "vod_pic":aid[1], + "type_name":'', + "vod_year":"", + "vod_area":"", + "vod_remarks":"", + "vod_actor":"", + "vod_director":"", + "vod_content":"" + } + vod['vod_play_from'] = 'CCTV' + vod['vod_play_url'] = title+"$"+link + + result = { + 'list':[ + vod + ] + } + return result + def searchContent(self,key,quick): + result = { + 'list':[] + } + return result + def playerContent(self,flag,id,vipFlags): + result = {} + rsp = self.fetch(id,headers=self.header) + content = rsp.text.strip() + arr = content.split('\n') + urlPrefix = self.regStr(id,'(http[s]?://[a-zA-z0-9.]+)/') + url = urlPrefix + arr[-1] + result["parse"] = 0 + result["playUrl"] = '' + result["url"] = url + result["header"] = '' + return result + + config = { + "player": {}, + "filter": {"TOPC1451557970755294": [{"key": "d", "name": "年份", "value": [{"n": "全部", "v": ""}, {"n": "2021", "v": "2021"}, {"n": "2020", "v": "2020"}, {"n": "2019", "v": "2019"}, {"n": "2018", "v": "2018"}, {"n": "2017", "v": "2017"}, {"n": "2016", "v": "2016"}, {"n": "2015", "v": "2015"}, {"n": "2014", "v": "2014"}, {"n": "2013", "v": "2013"}, {"n": "2012", "v": "2012"}, {"n": "2011", "v": "2011"}, {"n": "2010", "v": "2010"}, {"n": "2009", "v": "2009"}]}]} + } + header = { + "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.54 Safari/537.36" + } + + def localProxy(self,param): + return [200, "video/MP2T", action, ""] diff --git a/py/plugin/py_cctvzy.json b/py/plugin/py_cctvzy.json new file mode 100644 index 0000000..53403ca --- /dev/null +++ b/py/plugin/py_cctvzy.json @@ -0,0 +1,178 @@ +#coding=utf-8 +#!/usr/bin/python +import sys +sys.path.append('..') +from base.spider import Spider +import json +import time +import base64 + +class Spider(Spider): # 元类 默认的元类 type + def getName(self): + return "央视综艺" + def init(self,extend=""): + print("============{0}============".format(extend)) + pass + def isVideoFormat(self,url): + pass + def manualVideoCheck(self): + pass + def homeContent(self,filter): + result = {} + cateManual = { + "中华情":"TOPC1451541564922207", +"回声嘹亮":"TOPC1451535575561597", +"你好生活第三季":"TOPC1627961377879898", +"我的艺术清单":"TOPC1582272259917160", +"黄金100秒":"TOPC1451468496522494", +"非常6+1":"TOPC1451467940101208", +"向幸福出发":"TOPC1451984638791216", +"幸福账单":"TOPC1451984801613379", +"中国文艺报道":"TOPC1601348042760302", +"舞蹈世界":"TOPC1451547605511387", +"艺览天下":"TOPC1451984851125433", +"天天把歌唱":"TOPC1451535663610626", +"金牌喜剧班":"TOPC1611826337610628", +"环球综艺秀":"TOPC1571300682556971", +"挑战不可能第五季":"TOPC1579169060379297", +"我们有一套":"TOPC1451527089955940", +"为了你":"TOPC1451527001597710", +"朗读者第一季":"TOPC1487120479377477", +"挑战不可能第二季":"TOPC1474277421637816", +"精彩一刻":"TOPC1451464786232149", +"挑战不可能之加油中国":"TOPC1547519813971570", +"挑战不可能第一季":"TOPC1452063816677656", +"机智过人第三季":"TOPC1564019920570762", +"经典咏流传第二季":"TOPC1547521714115947", +"挑战不可能第三季":"TOPC1509500865106312", +"经典咏流传第一季":"TOPC1513676755770201", +"欢乐中国人第二季":"TOPC1516784350726581", +"故事里的中国第一季":"TOPC1569729252342702", +"你好生活第二季":"TOPC1604397385056621", +"喜上加喜":"TOPC1590026042145705", +"走在回家的路上":"TOPC1577697653272281", +"综艺盛典":"TOPC1451985071887935", +"艺术人生":"TOPC1451984891490556", +"全家好拍档":"TOPC1474275463547690", +"大魔术师":"TOPC1451984047073332", +"欢乐一家亲":"TOPC1451984214170587", +"开心辞典":"TOPC1451984378754815", +"综艺星天地":"TOPC1451985188986150", +"激情广场":"TOPC1451984341218765", +"笑星大联盟":"TOPC1451984731428297", +"天天乐":"TOPC1451984447718918", +"欢乐英雄":"TOPC1451984242834620", +"欢乐中国行":"TOPC1451984301286720", +"我爱满堂彩":"TOPC1451538709371329", +"综艺头条":"TOPC1569226855085860", +"中华情":"TOPC1451541564922207", +"魔法奇迹":"TOPC1451542029126607" + } + classes = [] + for k in cateManual: + classes.append({ + 'type_name':k, + 'type_id':cateManual[k] + }) + result['class'] = classes + if(filter): + result['filters'] = self.config['filter'] + return result + def homeVideoContent(self): + result = { + 'list':[] + } + return result + def categoryContent(self,tid,pg,filter,extend): + result = {} + extend['id'] = tid + extend['p'] = pg + filterParams = ["id", "p", "d"] + params = ["", "", ""] + for idx in range(len(filterParams)): + fp = filterParams[idx] + if fp in extend.keys(): + params[idx] = '{0}={1}'.format(filterParams[idx],extend[fp]) + suffix = '&'.join(params) + url = 'https://api.cntv.cn/NewVideo/getVideoListByColumn?{0}&n=20&sort=desc&mode=0&serviceId=tvcctv&t=json'.format(suffix) + if not tid.startswith('TOPC'): + url = 'https://api.cntv.cn/NewVideo/getVideoListByAlbumIdNew?{0}&n=20&sort=desc&mode=0&serviceId=tvcctv&t=json'.format(suffix) + rsp = self.fetch(url,headers=self.header) + jo = json.loads(rsp.text) + vodList = jo['data']['list'] + videos = [] + for vod in vodList: + guid = vod['guid'] + title = vod['title'] + img = vod['image'] + brief = vod['brief'] + videos.append({ + "vod_id":guid+"###"+img, + "vod_name":title, + "vod_pic":img, + "vod_remarks":'' + }) + result['list'] = videos + result['page'] = pg + result['pagecount'] = 9999 + result['limit'] = 90 + result['total'] = 999999 + return result + def detailContent(self,array): + aid = array[0].split('###') + tid = aid[0] + url = "https://vdn.apps.cntv.cn/api/getHttpVideoInfo.do?pid={0}".format(tid) + + rsp = self.fetch(url,headers=self.header) + jo = json.loads(rsp.text) + title = jo['title'].strip() + link = jo['hls_url'].strip() + vod = { + "vod_id":tid, + "vod_name":title, + "vod_pic":aid[1], + "type_name":'', + "vod_year":"", + "vod_area":"", + "vod_remarks":"", + "vod_actor":"", + "vod_director":"", + "vod_content":"" + } + vod['vod_play_from'] = 'CCTV' + vod['vod_play_url'] = title+"$"+link + + result = { + 'list':[ + vod + ] + } + return result + def searchContent(self,key,quick): + result = { + 'list':[] + } + return result + def playerContent(self,flag,id,vipFlags): + result = {} + rsp = self.fetch(id,headers=self.header) + content = rsp.text.strip() + arr = content.split('\n') + urlPrefix = self.regStr(id,'(http[s]?://[a-zA-z0-9.]+)/') + url = urlPrefix + arr[-1] + result["parse"] = 0 + result["playUrl"] = '' + result["url"] = url + result["header"] = '' + return result + + config = { + "player": {}, + "filter": {"TOPC1451557970755294": [{"key": "d", "name": "年份", "value": [{"n": "全部", "v": ""}, {"n": "2021", "v": "2021"}, {"n": "2020", "v": "2020"}, {"n": "2019", "v": "2019"}, {"n": "2018", "v": "2018"}, {"n": "2017", "v": "2017"}, {"n": "2016", "v": "2016"}, {"n": "2015", "v": "2015"}, {"n": "2014", "v": "2014"}, {"n": "2013", "v": "2013"}, {"n": "2012", "v": "2012"}, {"n": "2011", "v": "2011"}, {"n": "2010", "v": "2010"}, {"n": "2009", "v": "2009"}]}]} + } + header = { + "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.54 Safari/537.36" + } + + def localProxy(self,param): + return [200, "video/MP2T", action, ""] diff --git a/py/plugin/py_cokemv.json b/py/plugin/py_cokemv.json new file mode 100644 index 0000000..c864e48 --- /dev/null +++ b/py/plugin/py_cokemv.json @@ -0,0 +1,242 @@ +#coding=utf-8 +#!/usr/bin/python +import sys +sys.path.append('..') +from base.spider import Spider +import json +import requests +import base64 +import re + +class Spider(Spider): # 元类 默认的元类 type + def getName(self): + return "Cokemv" + def init(self,extend=""): + print("============{0}============".format(extend)) + pass + def homeContent(self,filter): + result = {} + cateManual = { + "抖音电影":"5", + "电视剧":"2", + "电影":"1", + "动漫":"4", + "综艺":"3" + } + classes = [] + for k in cateManual: + classes.append({ + 'type_name':k, + 'type_id':cateManual[k] + }) + + result['class'] = classes + if(filter): + result['filters'] = self.config['filter'] + return result + def homeVideoContent(self): + rsp = self.fetch("https://cokemv.me/") + root = self.html(rsp.text) + aList = root.xpath("//div[@class='main']//div[contains(@class,'module-items')]/a") + + videos = [] + for a in aList: + name = a.xpath('./@title')[0] + pic = a.xpath('.//img/@data-original')[0] + mark = a.xpath(".//div[@class='module-item-note']/text()")[0] + sid = a.xpath("./@href")[0] + sid = self.regStr(sid,"/voddetail/(\\S+).html") + videos.append({ + "vod_id":sid, + "vod_name":name, + "vod_pic":pic, + "vod_remarks":mark + }) + result = { + 'list':videos + } + return result + def categoryContent(self,tid,pg,filter,extend): + result = {} + + urlParams = ["", "", "", "", "", "", "", "", "", "", "", ""] + urlParams[0] = tid + urlParams[8] = pg + for key in extend: + urlParams[int(key)] = extend[key] + params = '-'.join(urlParams) + url = 'https://cokemv.me/vodshow/{0}.html'.format(params) + rsp = self.fetch(url) + root = self.html(rsp.text) + aList = root.xpath("//div[contains(@class, 'module-items')]/a") + videos = [] + for a in aList: + name = a.xpath('./@title')[0] + pic = a.xpath('.//img/@data-original')[0] + mark = a.xpath(".//div[contains(@class,'module-item-note')]/text()")[0] + sid = a.xpath("./@href")[0] + sid = self.regStr(sid,"/voddetail/(\\d+).html") + videos.append({ + "vod_id":sid, + "vod_name":name, + "vod_pic":pic, + "vod_remarks":mark + }) + + result['list'] = videos + result['page'] = pg + result['pagecount'] = 9999 + result['limit'] = 90 + result['total'] = 999999 + return result + def detailContent(self,array): + tid = array[0] + url = 'https://cokemv.me/voddetail/{0}.html'.format(tid) + rsp = self.fetch(url) + root = self.html(rsp.text) + divContent = root.xpath("//div[@class='module-info-main']")[0] + title = divContent.xpath('.//h1/text()')[0] + year = divContent.xpath('.//div/div/div[1]/a/text()')[0] + area = divContent.xpath('.//div/div/div[2]/a/text()')[0] + typ = divContent.xpath('.//div/div/div[3]/a/text()') + type = ', '.join(typ) + dir = divContent.xpath(".//div[@class='module-info-items']/div[2]/div[1]/a/text()")[0] + act = divContent.xpath(".//div[@class='module-info-items']/div[4]/div/a/text()") + actor = ', '.join(act) + pic = root.xpath(".//div[@class='module-poster-bg']//img/@data-original")[0] + detail = root.xpath(".//div[@class='module-info-introduction-content']/p/text()")[0] + vod = { + "vod_id":tid, + "vod_name":title, + "vod_pic":pic, + "type_name":type, + "vod_year":year, + "vod_area":area, + "vod_remarks":"", + "vod_actor":actor, + "vod_director":dir, + "vod_content":detail + } + + vod_play_from = '$$$' + playFrom = [] + vodHeader = root.xpath("//div[@class='module-tab-item tab-item']/span/text()") + for v in vodHeader: + playFrom.append(v) + vod_play_from = vod_play_from.join(playFrom) + + vod_play_url = '$$$' + playList = [] + vodList = root.xpath("//div[@class='module-play-list']") + for vl in vodList: + vodItems = [] + aList = vl.xpath('./div/a') + for tA in aList: + href = tA.xpath('./@href')[0] + name = tA.xpath('.//span/text()')[0] + tId = self.regStr(href,'/vodplay/(\\S+).html') + vodItems.append(name + "$" + tId) + joinStr = '#' + joinStr = joinStr.join(vodItems) + playList.append(joinStr) + vod_play_url = vod_play_url.join(playList) + + vod['vod_play_from'] = vod_play_from + vod['vod_play_url'] = vod_play_url + + result = { + 'list':[ + vod + ] + } + return result + + def verifyCode(self, url): + retry = 5 + header = {"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"} + while retry: + try: + session = requests.session() + img = session.get('https://cokemv.me/index.php/verify/index.html?', headers=header).content + code = session.post('https://api.nn.ci/ocr/b64/text', data=base64.b64encode(img).decode()).text + res = session.post(url=f"https://cokemv.me/index.php/ajax/verify_check?type=search&verify={code}", headers=header).json() + if res["msg"] == "ok": + return session + except Exception as e: + print(e) + finally: + retry = retry - 1 + + def searchContent(self, key, quick): + url = 'https://cokemv.me/vodsearch/-------------.html?wd={0}'.format(key) + session = self.verifyCode(url) + rsp = session.get(url) + root = self.html(rsp.text) + vodList = root.xpath("//div[@class='module-card-item module-item']/a[@class='module-card-item-poster']") + videos = [] + for vod in vodList: + name = vod.xpath(".//img/@alt")[0] + pic = vod.xpath(".//img/@data-original")[0] + mark = vod.xpath(".//div[@class='module-item-note']/text()")[0] + sid = vod.xpath("./@href")[0] + sid = self.regStr(sid,"/voddetail/(\\S+).html") + videos.append({ + "vod_id":sid, + "vod_name":name, + "vod_pic":pic, + "vod_remarks":mark + }) + result = { + 'list':videos + } + return result + + config = { + "player": {"coke11":{"show":"蓝光采集2(暂时)","des":"","ps":"0","parse":""},"ddzy":{"show":"蓝光采集3(暂时)","des":"","ps":"0","parse":""},"coke12345":{"show":"采集路线","des":"","ps":"0","parse":""},"cokemv0555":{"show":"COKEMV","des":"","ps":"0","parse":""},"cokeqie01":{"show":"極速路線","des":"","ps":"0","parse":""},"xin":{"show":"高速路線","des":"","ps":"0","parse":""},"90mm":{"show":"COKEMV(測試)","des":"","ps":"0","parse":""},"toutiao":{"show":"海外路線","des":"","ps":"0","parse":""},"age01":{"show":"動漫一線","des":"","ps":"0","parse":""},"mahua":{"show":"海外(禁國內)","des":"","ps":"0","parse":""},"age02":{"show":"動漫二線","des":"","ps":"0","parse":""}}, + "filter": {"5":[{"key":3,"name":"剧情","value":[{"n":"全部","v":""},{"n":"喜劇","v":"喜劇"},{"n":"愛情","v":"愛情"},{"n":"恐怖","v":"恐怖"},{"n":"動作","v":"動作"},{"n":"科幻","v":"科幻"},{"n":"劇情","v":"劇情"},{"n":"戰爭","v":"戰爭"},{"n":"犯罪","v":"犯罪"},{"n":"動畫","v":"動畫"},{"n":"奇幻","v":"奇幻"},{"n":"恐怖","v":"恐怖"},{"n":"懸疑","v":"懸疑"},{"n":"微電影","v":"微電影"}]},{"key":4,"name":"语言","value":[{"n":"全部","v":""},{"n":"國語","v":"國語"},{"n":"英語","v":"英語"},{"n":"粵語","v":"粵語"},{"n":" 閩南語","v":"閩南語"},{"n":"韓語","v":"韓語"},{"n":"日語","v":"日語"},{"n":"法語","v":"法語"},{"n":"德語","v":"德語"},{"n":"其它","v":"其它"}]},{"key":11,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"}]},{"key":5,"name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":2,"name":"排序","value":[{"n":"时间排序","v":"time"},{"n":"人气排序","v":"hits"},{"n":"评分排序","v":"score"}]}],"2":[{"key":0,"name":"类型","value":[{"n":"全部","v":"2"},{"n":"大陸劇","v":"13"},{"n":"香港劇","v":"14"},{"n":"韓國劇","v":"15"},{"n":"歐美劇","v":"16"},{"n":"日本劇","v":"20"},{"n":"台灣劇","v":"21"},{"n":"泰國劇","v":"22"}]},{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"中国大陆","v":"中国大陆"},{"n":"韩国","v":"韩国"},{"n":"中国香港","v":"中国香港"},{"n":"中国台湾","v":"中国台湾"},{"n":"日本","v":"日本"},{"n":"美国","v":"美国"},{"n":"加拿大","v":"加拿大"},{"n":"泰国","v":"泰国"},{"n":"英国","v":"英国"},{"n":"新加坡","v":"新加坡"},{"n":"其他","v":"其他"}]},{"key":4,"name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":11,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"}]},{"key":5,"name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":2,"name":"排序","value":[{"n":"时间排序","v":"time"},{"n":"人气排序","v":"hits"},{"n":"评分排序","v":"score"}]}],"1":[{"key":0,"name":"类型","value":[{"n":"全部","v":"1"},{"n":"動作片","v":"6"},{"n":"喜劇片","v":"7"},{"n":"愛情片","v":"8"},{"n":"科幻片","v":"9"},{"n":"恐怖片","v":"10"},{"n":"劇情片","v":"11"},{"n":"戰爭片","v":"12"},{"n":"犯罪片","v":"23"},{"n":"奇幻片","v":"24"},{"n":"懸疑片","v":"25"},{"n":"記錄片","v":"27"}]},{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"中国大陆","v":"中国大陆"},{"n":"韩国","v":"韩国"},{"n":"中国香港","v":"中国香港"},{"n":"中国台湾","v":"中国台湾"},{"n":"日本","v":"日本"},{"n":"美国","v":"美国"},{"n":"加拿大","v":"加拿大"},{"n":"泰国","v":"泰国"},{"n":"英国","v":"英国"},{"n":"新加坡","v":"新加坡"},{"n":"其他","v":"其他"}]},{"key":4,"name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"法语","v":"法语"},{"n":"德语","v":"德语"},{"n":"其它","v":"其它"}]},{"key":11,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"}]},{"key":5,"name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":2,"name":"排序","value":[{"n":"时间排序","v":"time"},{"n":"人气排序","v":"hits"},{"n":"评分排序","v":"score"}]}],"4":[{"key":0,"name":"类型","value":[{"n":"全部","v":"4"},{"n":"動畫電影","v":"41"}]},{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"中国大陆","v":"中国大陆"},{"n":"日本","v":"日本"},{"n":"美国","v":"美国"}]},{"key":4,"name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":11,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"}]},{"key":5,"name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":2,"name":"排序","value":[{"n":"时间排序","v":"time"},{"n":"人气排序","v":"hits"},{"n":"评分排序","v":"score"}]}],"3":[{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"中国大陆","v":"中国大陆"},{"n":"韩国","v":" 韩国"}]},{"key":4,"name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩 语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":11,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"}]},{"key":5,"name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":2,"name":"排序","value":[{"n":" 时间排序","v":"time"},{"n":"人气排序","v":"hits"},{"n":"评分排序","v":"score"}]}]} + } + header = { + "origin":"https://cokemv.me", + "User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36", + "Accept":" */*", + "Accept-Language":"zh-CN,zh;q=0.9,en-US;q=0.3,en;q=0.7", + "Accept-Encoding":"gzip, deflate" + } + def playerContent(self,flag,id,vipFlags): + url = 'https://cokemv.me/vodplay/{0}.html'.format(id) + rsp = self.fetch(url) + root = self.html(rsp.text) + scripts = root.xpath("//script/text()") + jo = {} + result = {} + for script in scripts: + if(script.startswith("var player_")): + target = script[script.index('{'):] + jo = json.loads(target) + break; + if jo['from'] in self.config['player']: + playerConfig = self.config['player'][jo['from']] + if jo['from'] == 'coke12345': + Url = jo['url'] + m3u = self.fetch(Url).text.split('\n')[2] + link = re.findall(r"http.*://.*?/", Url)[0].strip('/') + videoUrl = link + m3u + header = { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36" + } + result["header"] = header + else: + videoUrl = jo['url'] + result["header"] = json.dumps(self.header) + playerUrl = playerConfig['parse'] + result["parse"] = playerConfig['ps'] + result["playUrl"] = playerUrl + result["url"] = videoUrl + + return result + def isVideoFormat(self,url): + pass + def manualVideoCheck(self): + pass + def localProxy(self,param): + return [200, "video/MP2T", action, ""] \ No newline at end of file diff --git a/py/plugin/py_cokemv_1.json b/py/plugin/py_cokemv_1.json new file mode 100644 index 0000000..c864e48 --- /dev/null +++ b/py/plugin/py_cokemv_1.json @@ -0,0 +1,242 @@ +#coding=utf-8 +#!/usr/bin/python +import sys +sys.path.append('..') +from base.spider import Spider +import json +import requests +import base64 +import re + +class Spider(Spider): # 元类 默认的元类 type + def getName(self): + return "Cokemv" + def init(self,extend=""): + print("============{0}============".format(extend)) + pass + def homeContent(self,filter): + result = {} + cateManual = { + "抖音电影":"5", + "电视剧":"2", + "电影":"1", + "动漫":"4", + "综艺":"3" + } + classes = [] + for k in cateManual: + classes.append({ + 'type_name':k, + 'type_id':cateManual[k] + }) + + result['class'] = classes + if(filter): + result['filters'] = self.config['filter'] + return result + def homeVideoContent(self): + rsp = self.fetch("https://cokemv.me/") + root = self.html(rsp.text) + aList = root.xpath("//div[@class='main']//div[contains(@class,'module-items')]/a") + + videos = [] + for a in aList: + name = a.xpath('./@title')[0] + pic = a.xpath('.//img/@data-original')[0] + mark = a.xpath(".//div[@class='module-item-note']/text()")[0] + sid = a.xpath("./@href")[0] + sid = self.regStr(sid,"/voddetail/(\\S+).html") + videos.append({ + "vod_id":sid, + "vod_name":name, + "vod_pic":pic, + "vod_remarks":mark + }) + result = { + 'list':videos + } + return result + def categoryContent(self,tid,pg,filter,extend): + result = {} + + urlParams = ["", "", "", "", "", "", "", "", "", "", "", ""] + urlParams[0] = tid + urlParams[8] = pg + for key in extend: + urlParams[int(key)] = extend[key] + params = '-'.join(urlParams) + url = 'https://cokemv.me/vodshow/{0}.html'.format(params) + rsp = self.fetch(url) + root = self.html(rsp.text) + aList = root.xpath("//div[contains(@class, 'module-items')]/a") + videos = [] + for a in aList: + name = a.xpath('./@title')[0] + pic = a.xpath('.//img/@data-original')[0] + mark = a.xpath(".//div[contains(@class,'module-item-note')]/text()")[0] + sid = a.xpath("./@href")[0] + sid = self.regStr(sid,"/voddetail/(\\d+).html") + videos.append({ + "vod_id":sid, + "vod_name":name, + "vod_pic":pic, + "vod_remarks":mark + }) + + result['list'] = videos + result['page'] = pg + result['pagecount'] = 9999 + result['limit'] = 90 + result['total'] = 999999 + return result + def detailContent(self,array): + tid = array[0] + url = 'https://cokemv.me/voddetail/{0}.html'.format(tid) + rsp = self.fetch(url) + root = self.html(rsp.text) + divContent = root.xpath("//div[@class='module-info-main']")[0] + title = divContent.xpath('.//h1/text()')[0] + year = divContent.xpath('.//div/div/div[1]/a/text()')[0] + area = divContent.xpath('.//div/div/div[2]/a/text()')[0] + typ = divContent.xpath('.//div/div/div[3]/a/text()') + type = ', '.join(typ) + dir = divContent.xpath(".//div[@class='module-info-items']/div[2]/div[1]/a/text()")[0] + act = divContent.xpath(".//div[@class='module-info-items']/div[4]/div/a/text()") + actor = ', '.join(act) + pic = root.xpath(".//div[@class='module-poster-bg']//img/@data-original")[0] + detail = root.xpath(".//div[@class='module-info-introduction-content']/p/text()")[0] + vod = { + "vod_id":tid, + "vod_name":title, + "vod_pic":pic, + "type_name":type, + "vod_year":year, + "vod_area":area, + "vod_remarks":"", + "vod_actor":actor, + "vod_director":dir, + "vod_content":detail + } + + vod_play_from = '$$$' + playFrom = [] + vodHeader = root.xpath("//div[@class='module-tab-item tab-item']/span/text()") + for v in vodHeader: + playFrom.append(v) + vod_play_from = vod_play_from.join(playFrom) + + vod_play_url = '$$$' + playList = [] + vodList = root.xpath("//div[@class='module-play-list']") + for vl in vodList: + vodItems = [] + aList = vl.xpath('./div/a') + for tA in aList: + href = tA.xpath('./@href')[0] + name = tA.xpath('.//span/text()')[0] + tId = self.regStr(href,'/vodplay/(\\S+).html') + vodItems.append(name + "$" + tId) + joinStr = '#' + joinStr = joinStr.join(vodItems) + playList.append(joinStr) + vod_play_url = vod_play_url.join(playList) + + vod['vod_play_from'] = vod_play_from + vod['vod_play_url'] = vod_play_url + + result = { + 'list':[ + vod + ] + } + return result + + def verifyCode(self, url): + retry = 5 + header = {"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"} + while retry: + try: + session = requests.session() + img = session.get('https://cokemv.me/index.php/verify/index.html?', headers=header).content + code = session.post('https://api.nn.ci/ocr/b64/text', data=base64.b64encode(img).decode()).text + res = session.post(url=f"https://cokemv.me/index.php/ajax/verify_check?type=search&verify={code}", headers=header).json() + if res["msg"] == "ok": + return session + except Exception as e: + print(e) + finally: + retry = retry - 1 + + def searchContent(self, key, quick): + url = 'https://cokemv.me/vodsearch/-------------.html?wd={0}'.format(key) + session = self.verifyCode(url) + rsp = session.get(url) + root = self.html(rsp.text) + vodList = root.xpath("//div[@class='module-card-item module-item']/a[@class='module-card-item-poster']") + videos = [] + for vod in vodList: + name = vod.xpath(".//img/@alt")[0] + pic = vod.xpath(".//img/@data-original")[0] + mark = vod.xpath(".//div[@class='module-item-note']/text()")[0] + sid = vod.xpath("./@href")[0] + sid = self.regStr(sid,"/voddetail/(\\S+).html") + videos.append({ + "vod_id":sid, + "vod_name":name, + "vod_pic":pic, + "vod_remarks":mark + }) + result = { + 'list':videos + } + return result + + config = { + "player": {"coke11":{"show":"蓝光采集2(暂时)","des":"","ps":"0","parse":""},"ddzy":{"show":"蓝光采集3(暂时)","des":"","ps":"0","parse":""},"coke12345":{"show":"采集路线","des":"","ps":"0","parse":""},"cokemv0555":{"show":"COKEMV","des":"","ps":"0","parse":""},"cokeqie01":{"show":"極速路線","des":"","ps":"0","parse":""},"xin":{"show":"高速路線","des":"","ps":"0","parse":""},"90mm":{"show":"COKEMV(測試)","des":"","ps":"0","parse":""},"toutiao":{"show":"海外路線","des":"","ps":"0","parse":""},"age01":{"show":"動漫一線","des":"","ps":"0","parse":""},"mahua":{"show":"海外(禁國內)","des":"","ps":"0","parse":""},"age02":{"show":"動漫二線","des":"","ps":"0","parse":""}}, + "filter": {"5":[{"key":3,"name":"剧情","value":[{"n":"全部","v":""},{"n":"喜劇","v":"喜劇"},{"n":"愛情","v":"愛情"},{"n":"恐怖","v":"恐怖"},{"n":"動作","v":"動作"},{"n":"科幻","v":"科幻"},{"n":"劇情","v":"劇情"},{"n":"戰爭","v":"戰爭"},{"n":"犯罪","v":"犯罪"},{"n":"動畫","v":"動畫"},{"n":"奇幻","v":"奇幻"},{"n":"恐怖","v":"恐怖"},{"n":"懸疑","v":"懸疑"},{"n":"微電影","v":"微電影"}]},{"key":4,"name":"语言","value":[{"n":"全部","v":""},{"n":"國語","v":"國語"},{"n":"英語","v":"英語"},{"n":"粵語","v":"粵語"},{"n":" 閩南語","v":"閩南語"},{"n":"韓語","v":"韓語"},{"n":"日語","v":"日語"},{"n":"法語","v":"法語"},{"n":"德語","v":"德語"},{"n":"其它","v":"其它"}]},{"key":11,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"}]},{"key":5,"name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":2,"name":"排序","value":[{"n":"时间排序","v":"time"},{"n":"人气排序","v":"hits"},{"n":"评分排序","v":"score"}]}],"2":[{"key":0,"name":"类型","value":[{"n":"全部","v":"2"},{"n":"大陸劇","v":"13"},{"n":"香港劇","v":"14"},{"n":"韓國劇","v":"15"},{"n":"歐美劇","v":"16"},{"n":"日本劇","v":"20"},{"n":"台灣劇","v":"21"},{"n":"泰國劇","v":"22"}]},{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"中国大陆","v":"中国大陆"},{"n":"韩国","v":"韩国"},{"n":"中国香港","v":"中国香港"},{"n":"中国台湾","v":"中国台湾"},{"n":"日本","v":"日本"},{"n":"美国","v":"美国"},{"n":"加拿大","v":"加拿大"},{"n":"泰国","v":"泰国"},{"n":"英国","v":"英国"},{"n":"新加坡","v":"新加坡"},{"n":"其他","v":"其他"}]},{"key":4,"name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":11,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"}]},{"key":5,"name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":2,"name":"排序","value":[{"n":"时间排序","v":"time"},{"n":"人气排序","v":"hits"},{"n":"评分排序","v":"score"}]}],"1":[{"key":0,"name":"类型","value":[{"n":"全部","v":"1"},{"n":"動作片","v":"6"},{"n":"喜劇片","v":"7"},{"n":"愛情片","v":"8"},{"n":"科幻片","v":"9"},{"n":"恐怖片","v":"10"},{"n":"劇情片","v":"11"},{"n":"戰爭片","v":"12"},{"n":"犯罪片","v":"23"},{"n":"奇幻片","v":"24"},{"n":"懸疑片","v":"25"},{"n":"記錄片","v":"27"}]},{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"中国大陆","v":"中国大陆"},{"n":"韩国","v":"韩国"},{"n":"中国香港","v":"中国香港"},{"n":"中国台湾","v":"中国台湾"},{"n":"日本","v":"日本"},{"n":"美国","v":"美国"},{"n":"加拿大","v":"加拿大"},{"n":"泰国","v":"泰国"},{"n":"英国","v":"英国"},{"n":"新加坡","v":"新加坡"},{"n":"其他","v":"其他"}]},{"key":4,"name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"法语","v":"法语"},{"n":"德语","v":"德语"},{"n":"其它","v":"其它"}]},{"key":11,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"}]},{"key":5,"name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":2,"name":"排序","value":[{"n":"时间排序","v":"time"},{"n":"人气排序","v":"hits"},{"n":"评分排序","v":"score"}]}],"4":[{"key":0,"name":"类型","value":[{"n":"全部","v":"4"},{"n":"動畫電影","v":"41"}]},{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"中国大陆","v":"中国大陆"},{"n":"日本","v":"日本"},{"n":"美国","v":"美国"}]},{"key":4,"name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":11,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"}]},{"key":5,"name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":2,"name":"排序","value":[{"n":"时间排序","v":"time"},{"n":"人气排序","v":"hits"},{"n":"评分排序","v":"score"}]}],"3":[{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"中国大陆","v":"中国大陆"},{"n":"韩国","v":" 韩国"}]},{"key":4,"name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩 语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":11,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"}]},{"key":5,"name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":2,"name":"排序","value":[{"n":" 时间排序","v":"time"},{"n":"人气排序","v":"hits"},{"n":"评分排序","v":"score"}]}]} + } + header = { + "origin":"https://cokemv.me", + "User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36", + "Accept":" */*", + "Accept-Language":"zh-CN,zh;q=0.9,en-US;q=0.3,en;q=0.7", + "Accept-Encoding":"gzip, deflate" + } + def playerContent(self,flag,id,vipFlags): + url = 'https://cokemv.me/vodplay/{0}.html'.format(id) + rsp = self.fetch(url) + root = self.html(rsp.text) + scripts = root.xpath("//script/text()") + jo = {} + result = {} + for script in scripts: + if(script.startswith("var player_")): + target = script[script.index('{'):] + jo = json.loads(target) + break; + if jo['from'] in self.config['player']: + playerConfig = self.config['player'][jo['from']] + if jo['from'] == 'coke12345': + Url = jo['url'] + m3u = self.fetch(Url).text.split('\n')[2] + link = re.findall(r"http.*://.*?/", Url)[0].strip('/') + videoUrl = link + m3u + header = { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36" + } + result["header"] = header + else: + videoUrl = jo['url'] + result["header"] = json.dumps(self.header) + playerUrl = playerConfig['parse'] + result["parse"] = playerConfig['ps'] + result["playUrl"] = playerUrl + result["url"] = videoUrl + + return result + def isVideoFormat(self,url): + pass + def manualVideoCheck(self): + pass + def localProxy(self,param): + return [200, "video/MP2T", action, ""] \ No newline at end of file diff --git a/py/plugin/py_cyys.json b/py/plugin/py_cyys.json new file mode 100644 index 0000000..a164d4c --- /dev/null +++ b/py/plugin/py_cyys.json @@ -0,0 +1,216 @@ +# coding=utf-8 +# !/usr/bin/python +import sys +import re +sys.path.append('..') +from base.spider import Spider +import urllib.parse + +class Spider(Spider): # 元类 默认的元类 type + def getName(self): + return "创艺影视" + + def init(self, extend=""): + print("============{0}============".format(extend)) + pass + + def homeContent(self, filter): + result = {} + cateManual = { + "电影": "1", + "剧集": "2", + "动漫": "4", + "综艺": "3", + "纪录片": "30" + } + classes = [] + for k in cateManual: + classes.append({ + 'type_name': k, + 'type_id': cateManual[k] + }) + + result['class'] = classes + if (filter): + result['filters'] = self.config['filter'] + return result + + def homeVideoContent(self): + result = { + 'list': [] + } + return result + + def categoryContent(self, tid, pg, filter, extend): + result = {} + header = {"User-Agent": "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Mobile Safari/537.36"} + url = 'https://www.30dian.cn/vodtype/{0}-{1}.html'.format(tid, pg) + rsp = self.fetch(url,headers=header) + root = self.html(self.cleanText(rsp.text)) + aList = root.xpath("//div[@class='myui-panel myui-panel-bg clearfix']/div/div/ul/li") + videos = [] + for a in aList: + name = a.xpath('./div/a/@title')[0] + pic = a.xpath('./div/a/@data-original')[0] + mark = a.xpath("./div/a/span/span[@class='tag']/text()")[0] + sid = a.xpath("./div/a/@href")[0].replace("/", "").replace("voddetail", "").replace(".html", "") + videos.append({ + "vod_id": sid, + "vod_name": name, + "vod_pic": pic, + "vod_remarks": mark + }) + result['list'] = videos + result['page'] = pg + result['pagecount'] = 999 + result['limit'] = 5 + result['total'] = 9999 + return result + + def detailContent(self, array): + tid = array[0] + url = 'https://www.30dian.cn/voddetail/{0}.html'.format(tid) + header = {"User-Agent": "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Mobile Safari/537.36"} + rsp = self.fetch(url,headers=header) + root = self.html(self.cleanText(rsp.text)) + divContent = root.xpath("//div[@class='col-lg-wide-75 col-md-wide-7 col-xs-1 padding-0']")[0] + title = divContent.xpath(".//div[@class='myui-content__detail']/h1/text()")[0] + pic = divContent.xpath(".//div[@class='myui-content__thumb']/a/img/@data-original")[0] + det = divContent.xpath(".//div[@class='col-pd text-collapse content']/span[@class='data']")[0] + if det.text is None: + detail = det.xpath(".//p/text()")[0] + else: + detail = det.text + vod = { + "vod_id": tid, + "vod_name": title, + "vod_pic": pic, + "type_name": "", + "vod_year": "", + "vod_area": "", + "vod_remarks": "", + "vod_actor": "", + "vod_director": "", + "vod_content": detail + } + infoArray = divContent.xpath(".//div[@class='myui-content__detail']/p[contains(@class,'data')]") + for info in infoArray: + content = info.xpath('string(.)') + flag = "分类" in content + if flag == True: + infon = content.replace("\t","").replace("\n","").strip().split('\r') + for inf in infon: + if inf.startswith('分类'): + vod['type_name'] = inf.replace("分类:", "") + if inf.startswith('地区'): + vod['vod_area'] = inf.replace("地区:", "") + if inf.startswith('年份'): + vod['vod_year'] = inf.replace("年份:", "") + if content.startswith('主演'): + vod['vod_actor'] = content.replace("\xa0", "/").replace("主演:", "").strip('/') + if content.startswith('更新'): + vod['vod_remarks'] = content.replace("更新:", "") + if content.startswith('导演'): + vod['vod_director'] = content.replace("\xa0", "").replace("导演:", "").strip('/') + + vod_play_from = '$$$' + playFrom = [] + vodHeader = divContent.xpath(".//div[@class='myui-panel_hd']/div/ul/li/a[contains(@href,'playlist')]/text()") + for v in vodHeader: + playFrom.append(v.replace(" ", "")) + vod_play_from = vod_play_from.join(playFrom) + + vod_play_url = '$$$' + playList = [] + vodList = divContent.xpath(".//div[contains(@id,'playlist')]") + for vl in vodList: + vodItems = [] + aList = vl.xpath('./ul/li/a') + if len(aList) <= 0: + name = '无法找到播放源' + tId = '00000' + vodItems.append(name + "$" + tId) + else: + for tA in aList: + href = tA.xpath('./@href')[0] + name = tA.xpath("./text()")[0].replace(" ", "") + tId = self.regStr(href, '/vodplay/(\\S+).html') + vodItems.append(name + "$" + tId) + joinStr = '#' + joinStr = joinStr.join(vodItems) + playList.append(joinStr) + vod_play_url = vod_play_url.join(playList) + + vod['vod_play_from'] = vod_play_from + vod['vod_play_url'] = vod_play_url + result = { + 'list': [ + vod + ] + } + return result + + def searchContent(self, key, quick): + url = 'https://www.30dian.cn/vodsearch/-------------.html?wd={0}'.format(key) + header = { + "User-Agent": "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Mobile Safari/537.36"} + rsp = self.fetch(url, headers=header) + root = self.html(self.cleanText(rsp.text)) + aList = root.xpath("//ul[contains(@class,'myui-vodlist__media clearfix')]/li") + videos = [] + for a in aList: + name = a.xpath(".//div[@class='detail']/h4/a/text()")[0] + pic = a.xpath(".//a[contains(@class,'myui-vodlist__thumb')]//@data-original")[0] + mark = a.xpath(".//span[@class='tag']/text()")[0] + sid = a.xpath(".//div[@class='detail']/h4/a/@href")[0] + sid = self.regStr(sid,'/voddetail/(\\S+).html') + videos.append({ + "vod_id": sid, + "vod_name": name, + "vod_pic": pic, + "vod_remarks": mark + }) + result = { + 'list': videos + } + return result + + def playerContent(self, flag, id, vipFlags): + result = {} + header = { + "User-Agent": "Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Mobile Safari/537.36"} + if id == '00000': + return {} + url = 'https://www.30dian.cn/vodplay/{0}.html'.format(id) + rsp = self.fetch(url,headers=header) + root = self.html(self.cleanText(rsp.text)) + scripts = root.xpath("//div[@class='embed-responsive clearfix']/script[@type='text/javascript']/text()")[0] + ukey = re.findall(r"url(.*)url_next", scripts)[0].replace('"', "").replace(',', "").replace(':', "") + purl = urllib.parse.unquote(ukey) + result["parse"] = 0 + result["playUrl"] = '' + result["url"] =purl + result["header"] = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"} + return result + + config = { + "player": {}, + "filter": {} + } + header = {} + + def isVideoFormat(self, url): + pass + + def manualVideoCheck(self): + pass + + def localProxy(self, param): + action = { + 'url': '', + 'header': '', + 'param': '', + 'type': 'string', + 'after': '' + } + return [200, "video/MP2T", action, ""] diff --git a/py/plugin/py_czspp.json b/py/plugin/py_czspp.json new file mode 100644 index 0000000..f79b613 --- /dev/null +++ b/py/plugin/py_czspp.json @@ -0,0 +1,244 @@ +# coding=utf-8 +# !/usr/bin/python +import sys +sys.path.append('..') +from base.spider import Spider +import base64 +from Crypto.Cipher import AES + +class Spider(Spider): # 元类 默认的元类 type + def getName(self): + return "厂长资源" + + def init(self, extend=""): + print("============{0}============".format(extend)) + pass + + def homeContent(self, filter): + result = {} + cateManual = { + "豆瓣电影Top250": "dbtop250", + "最新电影": "zuixindianying", + "电视剧": "dsj", + "国产剧": "gcj", + "美剧": "meijutt", + "韩剧": "hanjutv", + "番剧": "fanju", + "动漫": "dm" + } + classes = [] + for k in cateManual: + classes.append({ + 'type_name': k, + 'type_id': cateManual[k] + }) + result['class'] = classes + return result + + def homeVideoContent(self): + rsp = self.fetch("https://czzy.art") + root = self.html(self.cleanText(rsp.text)) + aList = root.xpath("//div[@class='mi_btcon']//ul/li") + videos = [] + for a in aList: + name = a.xpath('./a/img/@alt')[0] + pic = a.xpath('./a/img/@data-original')[0] + mark = a.xpath("./div[@class='hdinfo']/span/text()")[0] + sid = a.xpath("./a/@href")[0] + sid = self.regStr(sid, "/movie/(\\S+).html") + videos.append({ + "vod_id": sid, + "vod_name": name, + "vod_pic": pic, + "vod_remarks": mark + }) + result = { + 'list': videos + } + return result + + def categoryContent(self, tid, pg, filter, extend): + result = {} + url = 'https://czzy.art/{0}/page/{1}'.format(tid, pg) + rsp = self.fetch(url) + root = self.html(self.cleanText(rsp.text)) + aList = root.xpath("//div[contains(@class,'mi_cont')]//ul/li") + videos = [] + for a in aList: + name = a.xpath('./a/img/@alt')[0] + pic = a.xpath('./a/img/@data-original')[0] + mark = a.xpath("./div[@class='hdinfo']/span/text()")[0] + sid = a.xpath("./a/@href")[0] + sid = self.regStr(sid, "/movie/(\\S+).html") + videos.append({ + "vod_id": sid, + "vod_name": name, + "vod_pic": pic, + "vod_remarks": mark + }) + result['list'] = videos + result['page'] = pg + result['pagecount'] = 9999 + result['limit'] = 90 + result['total'] = 999999 + return result + + def detailContent(self, array): + tid = array[0] + url = 'https://czzy.art/movie/{0}.html'.format(tid) + rsp = self.fetch(url) + root = self.html(self.cleanText(rsp.text)) + node = root.xpath("//div[@class='dyxingq']")[0] + pic = node.xpath(".//div[@class='dyimg fl']/img/@src")[0] + title = node.xpath('.//h1/text()')[0] + detail = root.xpath(".//div[@class='yp_context']//p/text()")[0] + vod = { + "vod_id": tid, + "vod_name": title, + "vod_pic": pic, + "type_name": "", + "vod_year": "", + "vod_area": "", + "vod_remarks": "", + "vod_actor": "", + "vod_director": "", + "vod_content": detail + } + infoArray = node.xpath(".//ul[@class='moviedteail_list']/li") + for info in infoArray: + content = info.xpath('string(.)') + if content.startswith('类型'): + tpyen = '' + for inf in info: + tn = inf.text + tpyen = tpyen +'/'+'{0}'.format(tn) + vod['type_name'] = tpyen.strip('/') + if content.startswith('地区'): + tpyeare = '' + for inf in info: + tn = inf.text + tpyeare = tpyeare +'/'+'{0}'.format(tn) + vod['vod_area'] = tpyeare.strip('/') + if content.startswith('豆瓣'): + vod['vod_remarks'] = content + if content.startswith('主演'): + tpyeact = '' + for inf in info: + tn = inf.text + tpyeact = tpyeact +'/'+'{0}'.format(tn) + vod['vod_actor'] = tpyeact.strip('/') + if content.startswith('导演'): + tpyedire = '' + for inf in info: + tn = inf.text + tpyedire = tpyedire +'/'+'{0}'.format(tn) + vod['vod_director'] = tpyedire .strip('/') + vod_play_from = '$$$' + playFrom = ['厂长'] + vod_play_from = vod_play_from.join(playFrom) + vod_play_url = '$$$' + playList = [] + vodList = root.xpath("//div[@class='paly_list_btn']") + for vl in vodList: + vodItems = [] + aList = vl.xpath('./a') + for tA in aList: + href = tA.xpath('./@href')[0] + name = tA.xpath('./text()')[0] + tId = self.regStr(href, '/v_play/(\\S+).html') + vodItems.append(name + "$" + tId) + joinStr = '#' + joinStr = joinStr.join(vodItems) + playList.append(joinStr) + vod_play_url = vod_play_url.join(playList) + + vod['vod_play_from'] = vod_play_from + vod['vod_play_url'] = vod_play_url + result = { + 'list': [ + vod + ] + } + return result + + def searchContent(self, key, quick): + url = 'https://czzy.art/xssearch?q={0}'.format(key) + rsp = self.fetch(url) + root = self.html(self.cleanText(rsp.text)) + vodList = root.xpath("//div[contains(@class,'mi_ne_kd')]/ul/li/a") + videos = [] + for vod in vodList: + name = vod.xpath('./img/@alt')[0] + pic = vod.xpath('./img/@data-original')[0] + href = vod.xpath('./@href')[0] + tid = self.regStr(href, 'movie/(\\S+).html') + res = vod.xpath('./div[@class="jidi"]/span/text()') + if len(res) == 0: + remark = '全1集' + else: + remark = vod.xpath('./div[@class="jidi"]/span/text()')[0] + videos.append({ + "vod_id": tid, + "vod_name": name, + "vod_pic": pic, + "vod_remarks": remark + }) + result = { + 'list': videos + } + return result + config = { + "player": {}, + "filter": {} + } + header = { + "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36" + } + def parseCBC(self, enc, key, iv): + keyBytes = key.encode("utf-8") + ivBytes = iv.encode("utf-8") + cipher = AES.new(keyBytes, AES.MODE_CBC, ivBytes) + msg = cipher.decrypt(enc) + paddingLen = msg[len(msg) - 1] + return msg[0:-paddingLen] + + def playerContent(self, flag, id, vipFlags): + url = 'https://czzy.art/v_play/{0}.html'.format(id) + pat = '\\"([^\\"]+)\\";var [\\d\\w]+=function dncry.*md5.enc.Utf8.parse\\(\\"([\\d\\w]+)\\".*md5.enc.Utf8.parse\\(([\\d]+)\\)' + rsp = self.fetch(url) + html = rsp.text + content = self.regStr(html, pat) + if content == '': + return {} + key = self.regStr(html, pat, 2) + iv = self.regStr(html, pat, 3) + decontent = self.parseCBC(base64.b64decode(content), key, iv).decode() + urlPat = 'video: \\{url: \\\"([^\\\"]+)\\\"' + vttPat = 'subtitle: \\{url:\\\"([^\\\"]+\\.vtt)\\\"' + str3 = self.regStr(decontent, urlPat) + str4 = self.regStr(decontent, vttPat) + self.loadVtt(str3) + result = { + 'parse': '0', + 'playUrl': '', + 'url': str3, + 'header': '' + } + if len(str4) > 0: + result['subf'] = '/vtt/utf-8' + # result['subt'] = Proxy.localProxyUrl() + "?do=czspp&url=" + URLEncoder.encode(str4) + result['subt'] = '' + return result + + def loadVtt(self, url): + pass + + def isVideoFormat(self, url): + pass + + def manualVideoCheck(self): + pass + + def localProxy(self, param): + action = {} + return [200, "video/MP2T", action, ""] diff --git a/py/plugin/py_douban.json b/py/plugin/py_douban.json new file mode 100644 index 0000000..f846c4d --- /dev/null +++ b/py/plugin/py_douban.json @@ -0,0 +1,128 @@ +#coding=utf-8 +#!/usr/bin/python +import sys +sys.path.append('..') +from base.spider import Spider +import json + +host_url = 'https://frodo.douban.com/api/v2' +apikey = "?apikey=0ac44ae016490db2204ce0a042db2916" + +class Spider(Spider): # 元类 默认的元类 type + def getName(self): + return "豆瓣" + def init(self,extend=""): + print("============{0}============".format(extend)) + pass + def isVideoFormat(self,url): + pass + def manualVideoCheck(self): + pass + def homeContent(self,filter): + result = {} + cateManual = { + "热门电影": "hot_gaia", + "热播剧集": "tv_hot", + "热播综艺": "show_hot", + "电影筛选": "movie", + "电视筛选": "tv", + "电影榜单": "rank_list_movie", + "电视榜单": "rank_list_tv" + } + classes = [] + for k in cateManual: + classes.append({ + 'type_name':k, + 'type_id':cateManual[k] + }) + result['class'] = classes + if(filter): + result['filters'] = self.config['filter'] + return result + def homeVideoContent(self): + url = host_url + '/subject_collection/subject_real_time_hotest/items' + apikey + rsp = self.fetch(url,headers=self.header) + jo = json.loads(rsp.text) + joList = jo.get("subject_collection_items") + lists = [] + for item in joList: + rating = item['rating']['value'] if item['rating'] else "" + lists.append({ + "vod_id": f'msearch:{item.get("type", "")}__{item.get("id", "")}', + "vod_name": item['title'], + "vod_pic": item['pic']['normal'], + "vod_remarks": rating + }) + result = { + 'list':lists + } + return result + def categoryContent(self,tid,pg,filter,extend): + result = {} + if extend: + sort = extend.pop('sort') if "sort" in extend else "T" + tags = ",".join(item for item in extend.values()) + else: + sort = "T" + tags = "" + if tid == "hot_gaia": + urlpath = f"/movie/{tid}" + getdata = "items" + sort = extend.get("sort", "recommend") + area = extend.get("area", "全部") + sort = sort + "&area=" + area + elif tid == "tv_hot" or tid == "show_hot": + urlpath = f"/subject_collection/{tid}/items" + getdata = "subject_collection_items" + elif tid.startswith("rank_list"): + id = "movie_real_time_hotest" if tid == "rank_list_movie" else "tv_real_time_hotest" + urlpath = f"/subject_collection/{id}/items" + getdata = "subject_collection_items" + else: + urlpath = f"/{tid}/recommend" + getdata = "items" + + url = host_url + urlpath + apikey + '&sort=' + sort + '&tags=' + tags + '&start=' + str((int(pg) - 1) * 30) + rsp = self.fetch(url,headers=self.header) + jo = json.loads(rsp.text) + jolist = jo[getdata] + + videos = [] + for vod in jolist: + rating = vod.get("rating", "").get("value", "") if vod.get("rating", "") else "" + pic = vod.get("pic", "").get("normal", "") if vod.get("pic", "") else "" + videos.append({ + "vod_id": f'msearch:{vod.get("type", "")}__{vod.get("id", "")}', + "vod_name": vod['title'], + "vod_pic": pic, + "vod_remarks": rating + }) + + result['list'] = videos + result['page'] = pg + result['pagecount'] = 9999 + result['limit'] = 90 + result['total'] = 999999 + return result + + def detailContent(self,array): + pass + def searchContent(self,key,quick): + pass + def playerContent(self,flag,id,vipFlags): + pass + + config = { + "player": {}, + "filter": {"hot_gaia":[{"key":"sort","name":"排序","value":[{"n":"热度","v":"recommend"},{"n":"最新","v":"time"},{"n":"评分","v":"rank"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":"全部"},{"n":"华语","v":"华语"},{"n":"欧美","v":"欧美"},{"n":"韩国","v":"韩国"},{"n":"日本","v":"日本"}]}],"tv_hot":[{"key":"type","name":"分类","value":[{"n":"综合","v":"tv_hot"},{"n":"国产剧","v":"tv_domestic"},{"n":"欧美剧","v":"tv_american"},{"n":"日剧","v":"tv_japanese"},{"n":"韩剧","v":"tv_korean"},{"n":"动画","v":"tv_animation"}]}],"show_hot":[{"key":"type","name":"分类","value":[{"n":"综合","v":"show_hot"},{"n":"国内","v":"show_domestic"},{"n":"国外","v":"show_foreign"}]}],"movie":[{"key":"类型","name":"类型","value":[{"n":"全部类型","v":""},{"n":"喜剧","v":"喜剧"},{"n":"爱情","v":"爱情"},{"n":"动作","v":"动作"},{"n":"科幻","v":"科幻"},{"n":"动画","v":"动画"},{"n":"悬疑","v":"悬疑"},{"n":"犯罪","v":"犯罪"},{"n":"惊悚","v":"惊悚"},{"n":"冒险","v":"冒险"},{"n":"音乐","v":"音乐"},{"n":"历史","v":"历史"},{"n":"奇幻","v":"奇幻"},{"n":"恐怖","v":"恐怖"},{"n":"战争","v":"战争"},{"n":"传记","v":"传记"},{"n":"歌舞","v":"歌舞"},{"n":"武侠","v":"武侠"},{"n":"情色","v":"情色"},{"n":"灾难","v":"灾难"},{"n":"西部","v":"西部"},{"n":"纪录片","v":"纪录片"},{"n":"短片","v":"短片"}]},{"key":"地区","name":"地区","value":[{"n":"全部地区","v":""},{"n":"华语","v":"华语"},{"n":"欧美","v":"欧美"},{"n":"韩国","v":"韩国"},{"n":"日本","v":"日本"},{"n":"中国大陆","v":"中国大陆"},{"n":"美国","v":"美国"},{"n":"中国香港","v":"中国香港"},{"n":"中国台湾","v":"中国台湾"},{"n":"英国","v":"英国"},{"n":"法国","v":"法国"},{"n":"德国","v":"德国"},{"n":"意大利","v":"意大利"},{"n":"西班牙","v":"西班牙"},{"n":"印度","v":"印度"},{"n":"泰国","v":"泰国"},{"n":"俄罗斯","v":"俄罗斯"},{"n":"加拿大","v":"加拿大"},{"n":"澳大利亚","v":"澳大利亚"},{"n":"爱尔兰","v":"爱尔兰"},{"n":"瑞典","v":"瑞典"},{"n":"巴西","v":"巴西"},{"n":"丹麦","v":"丹麦"}]},{"key":"sort","name":"排序","value":[{"n":"近期热度","v":"T"},{"n":"首映时间","v":"R"},{"n":"高分优先","v":"S"}]},{"key":"年代","name":"年代","value":[{"n":"全部年代","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2010年代","v":"2010年代"},{"n":"2000年代","v":"2000年代"},{"n":"90年代","v":"90年代"},{"n":"80年代","v":"80年代"},{"n":"70年代","v":"70年代"},{"n":"60年代","v":"60年代"},{"n":"更早","v":"更早"}]}],"tv":[{"key":"类型","name":"类型","value":[{"n":"不限","v":""},{"n":"电视剧","v":"电视剧"},{"n":"综艺","v":"综艺"}]},{"key":"电视剧形式","name":"电视剧形式","value":[{"n":"不限","v":""},{"n":"喜剧","v":"喜剧"},{"n":"爱情","v":"爱情"},{"n":"悬疑","v":"悬疑"},{"n":"动画","v":"动画"},{"n":"武侠","v":"武侠"},{"n":"古装","v":"古装"},{"n":"家庭","v":"家庭"},{"n":"犯罪","v":"犯罪"},{"n":"科幻","v":"科幻"},{"n":"恐怖","v":"恐怖"},{"n":"历史","v":"历史"},{"n":"战争","v":"战争"},{"n":"动作","v":"动作"},{"n":"冒险","v":"冒险"},{"n":"传记","v":"传记"},{"n":"剧情","v":"剧情"},{"n":"奇幻","v":"奇幻"},{"n":"惊悚","v":"惊悚"},{"n":"灾难","v":"灾难"},{"n":"歌舞","v":"歌舞"},{"n":"音乐","v":"音乐"}]},{"key":"综艺形式","name":"综艺形式","value":[{"n":"不限","v":""},{"n":"真人秀","v":"真人秀"},{"n":"脱口秀","v":"脱口秀"},{"n":"音乐","v":"音乐"},{"n":"歌舞","v":"歌舞"}]},{"key":"地区","name":"地区","value":[{"n":"全部地区","v":""},{"n":"华语","v":"华语"},{"n":"欧美","v":"欧美"},{"n":"国外","v":"国外"},{"n":"韩国","v":"韩国"},{"n":"日本","v":"日本"},{"n":"中国大陆","v":"中国大陆"},{"n":"中国香港","v":"中国香港"},{"n":"美国","v":"美国"},{"n":"英国","v":"英国"},{"n":"泰国","v":"泰国"},{"n":"中国台湾","v":"中国台湾"},{"n":"意大利","v":"意大利"},{"n":"法国","v":"法国"},{"n":"德国","v":"德国"},{"n":"西班牙","v":"西班牙"},{"n":"俄罗斯","v":"俄罗斯"},{"n":"瑞典","v":"瑞典"},{"n":"巴西","v":"巴西"},{"n":"丹麦","v":"丹麦"},{"n":"印度","v":"印度"},{"n":"加拿大","v":"加拿大"},{"n":"爱尔兰","v":"爱尔兰"},{"n":"澳大利亚","v":"澳大利亚"}]},{"key":"sort","name":"排序","value":[{"n":"近期热度","v":"T"},{"n":"首播时间","v":"R"},{"n":"高分优先","v":"S"}]},{"key":"年代","name":"年代","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2010年代","v":"2010年代"},{"n":"2000年代","v":"2000年代"},{"n":"90年代","v":"90年代"},{"n":"80年代","v":"80年代"},{"n":"70年代","v":"70年代"},{"n":"60年代","v":"60年代"},{"n":"更早","v":"更早"}]},{"key":"平台","name":"平台","value":[{"n":"全部","v":""},{"n":"腾讯视频","v":"腾讯视频"},{"n":"爱奇艺","v":"爱奇艺"},{"n":"优酷","v":"优酷"},{"n":"湖南卫视","v":"湖南卫视"},{"n":"Netflix","v":"Netflix"},{"n":"HBO","v":"HBO"},{"n":"BBC","v":"BBC"},{"n":"NHK","v":"NHK"},{"n":"CBS","v":"CBS"},{"n":"NBC","v":"NBC"},{"n":"tvN","v":"tvN"}]}],"rank_list_movie":[{"key":"榜单","name":"榜单","value":[{"n":"实时热门电影","v":"movie_real_time_hotest"},{"n":"一周口碑电影榜","v":"movie_weekly_best"},{"n":"豆瓣电影Top250","v":"movie_top250"}]}],"rank_list_tv":[{"key":"榜单","name":"榜单","value":[{"n":"实时热门电视","v":"tv_real_time_hotest"},{"n":"华语口碑剧集榜","v":"tv_chinese_best_weekly"},{"n":"全球口碑剧集榜","v":"tv_global_best_weekly"},{"n":"国内口碑综艺榜","v":"show_chinese_best_weekly"},{"n":"国外口碑综艺榜","v":"show_global_best_weekly"}]}]} + } + header = { + "Host": "frodo.douban.com", + "Connection": "Keep-Alive", + "Referer": "https://servicewechat.com/wx2f9b06c1de1ccfca/84/page-frame.html", + "content-type": "application/json", + "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 MicroMessenger/7.0.9.501 NetType/WIFI MiniProgramEnv/Windows WindowsWechat" + } + + def localProxy(self,param): + return [200, "video/MP2T", action, ""] \ No newline at end of file diff --git a/py/plugin/py_douyu.json b/py/plugin/py_douyu.json new file mode 100644 index 0000000..08d01ae --- /dev/null +++ b/py/plugin/py_douyu.json @@ -0,0 +1,147 @@ +#coding=utf-8 +#!/usr/bin/python +import sys +sys.path.append('..') +from base.spider import Spider +import json + +class Spider(Spider): + def getName(self): + return "斗鱼" + def init(self,extend=""): + pass + def isVideoFormat(self,url): + pass + def manualVideoCheck(self): + pass + def homeContent(self,filter): + result = {} + cateManual = { + "热门游戏": "热门游戏", + "一起看": "一起看", + "主机游戏": "主机游戏", + "原创IP": "原创IP", + "王者荣耀":"王者荣耀", + "英雄联盟":"英雄联盟", + "第五人格":"第五人格", + "火影忍者":"火影忍者", + "和平精英":"和平精英", + "DOTA2":"DOTA2", + "CF手游":"CF手游" + + } + classes = [] + for k in cateManual: + classes.append({ + 'type_name': k, + 'type_id': cateManual[k] + }) + + result['class'] = classes + if (filter): + result['filters'] = self.config['filter'] + return result + def homeVideoContent(self): + result = {} + return result + def categoryContent(self,tid,pg,filter,extend): + result = {} + url = 'http://live.yj1211.work/api/live/getRecommendByPlatformArea?platform=douyu&size=20&area={0}&page={1}'.format(tid, pg) + rsp = self.fetch(url) + content = rsp.text + jo = json.loads(content) + videos = [] + vodList = jo['data'] + for vod in vodList: + aid = (vod['roomId']).strip() + title = vod['roomName'].strip() + img = vod['roomPic'].strip() + remark = (vod['categoryName']).strip() + videos.append({ + "vod_id": aid, + "vod_name": title, + "vod_pic": img, + "vod_remarks": remark + }) + result['list'] = videos + result['page'] = pg + result['pagecount'] = 9999 + result['limit'] = 90 + result['total'] = 999999 + return result + def detailContent(self,array): + aid = array[0] + url = "http://live.yj1211.work/api/live/getRoomInfo?platform=douyu&roomId={0}".format(aid) + rsp = self.fetch(url) + jRoot = json.loads(rsp.text) + jo = jRoot['data'] + title = jo['roomName'] + pic = jo['roomPic'] + desc = str(jo['online']) + dire = jo['ownerName'] + typeName = jo['categoryName'] + remark = jo['categoryName'] + vod = { + "vod_id": aid, + "vod_name": title, + "vod_pic": pic, + "type_name": typeName, + "vod_year": "", + "vod_area": "", + "vod_remarks": remark, + "vod_actor": '在线人数:' + desc, + "vod_director": dire, + "vod_content": "" + } + playUrl = '原画' + '${0}#'.format(aid) + vod['vod_play_from'] = '斗鱼直播' + vod['vod_play_url'] = playUrl + + result = { + 'list': [ + vod + ] + } + return result + def searchContent(self,key,quick): + result = {} + return result + def playerContent(self,flag,id,vipFlags): + result = {} + + url = 'http://live.yj1211.work/api/live/getRealUrl?platform=douyu&roomId={0}'.format(id) + rsp = self.fetch(url) + jRoot = json.loads(rsp.text) + jo = jRoot['data'] + ja = jo['OD'] + url = ja + + result["parse"] = 0 + result["playUrl"] = '' + result["url"] = url + result["header"] = { + "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" + } + result["contentType"] = 'video/x-flv' + return result + + config = { + "player": {}, + "filter": {} + } + header = {} + + config = { + "player": {}, + "filter": {} + } + header = {} + def localProxy(self,param): + action = { + 'url':'', + 'header':'', + 'param':'', + 'type':'string', + 'after':'' + } + return [200, "video/MP2T", action, ""] diff --git a/py/plugin/py_freezb.json b/py/plugin/py_freezb.json new file mode 100644 index 0000000..e956f0c --- /dev/null +++ b/py/plugin/py_freezb.json @@ -0,0 +1,161 @@ +#coding=utf-8 +#!/usr/bin/python +import sys +sys.path.append('..') +from base.spider import Spider +import re +import math + +class Spider(Spider): + def getName(self): + return "体育直播" + def init(self,extend=""): + pass + def isVideoFormat(self,url): + pass + def manualVideoCheck(self): + pass + def homeContent(self,filter): + result = {} + cateManual = { + "全部": "" + } + classes = [] + for k in cateManual: + classes.append({ + 'type_name': k, + 'type_id': cateManual[k] + }) + + result['class'] = classes + if (filter): + result['filters'] = self.config['filter'] + return result + def homeVideoContent(self): + result = {} + return result + + def categoryContent(self,tid,pg,filter,extend): + result = {} + url = 'http://www.freezb.live/' + rsp = self.fetch(url) + html = self.html(rsp.text) + aList = html.xpath("//tr[@class='match_main']") + videos = [] + img = 'https://s1.ax1x.com/2022/10/07/x3NPUO.png' + for a in aList: + urlList = a.xpath("./td[@class='update_data live_link']/a") + stat = a.xpath("./td[contains(@style, 'font-weight:bold')]/sapn/@title")[0] + time = a.xpath("./td[contains(@style, 'font-weight:bold')]/sapn/text()")[0] + if '比分' not in urlList[0].xpath("./text()")[0] and stat == '直播中': + remark = a.xpath(".//p[@class='raceclass matchcolor']/@title")[0].replace('直播','') + '|' + time + name = a.xpath("string(./td[4])").replace(' ','').replace('\tVS','VS') + if 'VS' not in name: + names = name.split('\t') + remark = names[0] + '|' + time + name = names[-1].replace('vs','VS') + aid = '' + for url in urlList: + title = url.xpath("./text()")[0] + aurl = url.xpath("./@href")[0] + aurl = self.regStr(reg=r'/tv/(.*?).html', src=aurl) + if '比分' not in title: + aid = aid + title + '@@@' + aurl + '#' + videos.append({ + "vod_id": name + '###' + remark.split('|')[0] + '###' + aid, + "vod_name": name, + "vod_pic": img, + "vod_remarks": remark + }) + numvL = len(videos) + pgc = math.ceil(numvL/15) + result['list'] = videos + result['page'] = pg + result['pagecount'] = pgc + result['limit'] = numvL + result['total'] = numvL + return result + + def detailContent(self,array): + aid = array[0] + aids = aid.split('###') + name = aids[0] + typeName = aids[1] + tus = aids[2].strip('#').split('#') + pic = 'https://s1.ax1x.com/2022/10/07/x3NPUO.png' + vod = { + "vod_id": name, + "vod_name": name, + "vod_pic": pic, + "type_name": typeName, + "vod_year": "", + "vod_area": "", + "vod_remarks": '', + "vod_actor": '', + "vod_director":'', + "vod_content": '' + } + purl = '' + for tu in tus: + title = tu.split('@@@')[0] + uid = tu.split('@@@')[1] + url = "http://www.freezb.live/tv/{0}.html".format(uid) + rsp = self.fetch(url) + root = self.html(rsp.text) + phpurl = root.xpath("//div[@class='media']/iframe/@src")[0] + purl = purl + '{0}${1}@@@{2}'.format(title,phpurl,uid) + '#' + vod['vod_play_from'] = '体育直播' + vod['vod_play_url'] = purl + result = { + 'list': [ + vod + ] + } + return result + + def searchContent(self,key,quick): + result = {} + return result + + def playerContent(self,flag,id,vipFlags): + result = {} + ids = id.split('@@@') + url = ids[0] + vid = ids[1] + headers = { + "referer": "http://www.freezb.live/tv/{0}.html".format(vid), + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36" + } + rsp = self.fetch(url,headers=headers) + aurl = self.regStr(reg=r'\"../(.*?)\"', src=rsp.text) + if aurl =='': + url = self.regStr(reg=r"url: \'(.*?)\'", src=rsp.text) + else: + pheaders = { + "referer": url, + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36" + } + purl = self.regStr(reg=r'(.*)/', src=url) + '/' + aurl + prsp = self.fetch(purl, headers=pheaders) + url = self.regStr(reg=r"url: \'(.*?)\'", src=prsp.text) + result["parse"] = 0 + result["playUrl"] = '' + result["url"] = url + result["header"] = '' + return result + + config = { + "player": {}, + "filter": {} + } + header = {} + + def localProxy(self,param): + action = { + 'url':'', + 'header':'', + 'param':'', + 'type':'string', + 'after':'' + } + return [200, "video/MP2T", action, ""] \ No newline at end of file diff --git a/py/plugin/py_genmov.json b/py/plugin/py_genmov.json new file mode 100644 index 0000000..b00249b --- /dev/null +++ b/py/plugin/py_genmov.json @@ -0,0 +1,202 @@ +#coding=utf-8 +#!/usr/bin/python +import sys +sys.path.append('..') +from base.spider import Spider +import json + +class Spider(Spider): # 元类 默认的元类 type + def getName(self): + return "我爱跟剧" + def init(self,extend=""): + print("============{0}============".format(extend)) + pass + def isVideoFormat(self,url): + pass + def manualVideoCheck(self): + pass + def homeContent(self,filter): + # genmov + # https://www.genmov.com/v/yinyue.html + result = {} + cateManual = { + "电影":"dianying", + "连续剧":"lianxuju", + "动漫":"dongman", + "综艺":"zongyi", + "少儿":"shaoer", + "音乐":"yinyue" + } + classes = [] + for k in cateManual: + classes.append({ + 'type_name':k, + 'type_id':cateManual[k] + }) + result['class'] = classes + if(filter): + result['filters'] = self.config['filter'] + return result + def homeVideoContent(self): + rsp = self.fetch("https://www.genmov.com/",headers=self.header) + root = self.html(rsp.text) + aList = root.xpath("//div[@class='module module-wrapper']//div[@class='module-item']") + videos = [] + for a in aList: + name = a.xpath(".//div[@class='module-item-pic']/a/@title")[0] + pic = a.xpath(".//div[@class='module-item-pic']/img/@data-src")[0] + mark = a.xpath("./div[@class='module-item-text']/text()")[0] + sid = a.xpath(".//div[@class='module-item-pic']/a/@href")[0] + sid = self.regStr(sid,"/video/(\\S+).html") + videos.append({ + "vod_id":sid, + "vod_name":name, + "vod_pic":pic, + "vod_remarks":mark + }) + result = { + 'list':videos + } + return result + def categoryContent(self,tid,pg,filter,extend): + result = {} + urlParams = ["", "", "", "", "", "", "", "", "", "", "", ""] + urlParams[0] = tid + urlParams[8] = pg + for key in extend: + urlParams[int(key)] = extend[key] + params = '-'.join(urlParams) + url = 'https://www.genmov.com/vodshow/{0}.html'.format(params) + rsp = self.fetch(url,headers=self.header) + root = self.html(rsp.text) + aList = root.xpath("//div[@class='module-items']/div[@class='module-item']") + videos = [] + for a in aList: + name = a.xpath(".//div[@class='module-item-pic']/a/@title")[0] + pic = a.xpath(".//div[@class='module-item-pic']/img/@data-src")[0] + mark = a.xpath("./div[@class='module-item-text']/text()")[0] + sid = a.xpath(".//div[@class='module-item-pic']/a/@href")[0] + sid = self.regStr(sid,"/video/(\\S+).html") + videos.append({ + "vod_id":sid, + "vod_name":name, + "vod_pic":pic, + "vod_remarks":mark + }) + result['list'] = videos + result['page'] = pg + result['pagecount'] = 9999 + result['limit'] = 90 + result['total'] = 999999 + return result + def detailContent(self,array): + # video-info-header + tid = array[0] + url = 'https://www.genmov.com/video/{0}.html'.format(tid) + rsp = self.fetch(url,headers=self.header) + root = self.html(rsp.text) + title = root.xpath(".//h1[@class='page-title']/text()")[0] + pic = root.xpath(".//div[@class='video-cover']//img/@data-src")[0] + vod = { + "vod_id":tid, + "vod_name":title, + "vod_pic":pic, + "type_name":"", + "vod_year":"", + "vod_area":"", + "vod_remarks":"", + "vod_actor":"", + "vod_director":"", + "vod_content":"" + } + infoArray = root.xpath(".//div[@class='video-info-items']") + for info in infoArray: + content = info.xpath('string(.)') + # if content.startswith('类型'): + # vod['type_name'] = content + # if content.startswith('年份'): + # vod['vod_year'] = content + # if content.startswith('地区'): + # vod['vod_area'] = content + if content.startswith('集数'): + vod['vod_remarks'] = content + if content.startswith('主演'): + vod['vod_actor'] = content + if content.startswith('导演'): + vod['vod_director'] = content + if content.startswith('剧情'): + vod['vod_content'] = content + + vod_play_from = '$$$' + playFrom = [] + vodHeader = root.xpath(".//main[@id='main']//div[@class='module-heading']//div[contains(@class,'module-tab-item')]/span/text()") + for v in vodHeader: + playFrom.append(v) + vod_play_from = vod_play_from.join(playFrom) + + vod_play_url = '$$$' + playList = [] + vodList = root.xpath(".//main[@id='main']//div[contains(@class,'module-list')]//div[@class='sort-item']") + for vl in vodList: + vodItems = [] + aList = vl.xpath('./a') + for tA in aList: + href = tA.xpath('./@href')[0] + name = tA.xpath('./span/text()')[0] + tId = self.regStr(href,'/play/(\\S+).html') + vodItems.append(name + "$" + tId) + joinStr = '#' + joinStr = joinStr.join(vodItems) + playList.append(joinStr) + vod_play_url = vod_play_url.join(playList) + + vod['vod_play_from'] = vod_play_from + vod['vod_play_url'] = vod_play_url + + result = { + 'list':[ + vod + ] + } + return result + def searchContent(self,key,quick): + result = {} + return result + def playerContent(self,flag,id,vipFlags): + # https://www.genmov.com/play/301475-1-1.html + # https://www.genmov.com/static/js/playerconfig.js + url = 'https://www.genmov.com/play/{0}.html'.format(id) + rsp = self.fetch(url,headers=self.header) + root = self.html(rsp.text) + scripts = root.xpath("//script/text()") + jo = {} + for script in scripts: + if(script.startswith("var player_")): + target = script[script.index('{'):] + jo = json.loads(target) + break; + result = {} + parseUrl = "" + playerConfig = self.config['player'] + if jo['from'] in self.config['player']: + parser = self.config['player'][jo['from']] + originUrl = jo['url'] + parseUrl = parser['parse'] + + result["parse"] = parser['ps'] + result["playUrl"] = parseUrl + result["url"] = originUrl + result["header"] = '' + return result + + cookie = {} + config = { + "player": {"dplayer":{"show":"默认","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"qqy":{"show":"预告专用","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"qiyi":{"show":"爱奇艺","des":"qiyi.com","ps":"1","parse":"https://vip.2ktvb.com/player/sg.php?url="},"youku":{"show":"优酷","des":"youku.com","ps":"1","parse":"https://vip.2ktvb.com/player/sg.php?url="},"qq":{"show":"腾讯","des":"qq.com","ps":"1","parse":"https://vip.2ktvb.com/player/sg.php?url="},"mgtv":{"show":"芒果","des":"mgtv.com","ps":"1","parse":"https://vip.2ktvb.com/player/sg.php?url="},"letv":{"show":"乐视","des":"","ps":"1","parse":"https://jx.quanmingjiexi.com/?url="},"m1905":{"show":"电影网","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/sg.php?url="},"bilibili":{"show":"哔哩哔哩","des":"","ps":"1","parse":"https://jx.bozrc.com:4433/player/?url="},"sohu":{"show":"搜狐","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/sg.php?url="},"lzm3u8":{"show":"量子资源1","des":"支持手机电脑在线播放","ps":"0","parse":""},"ss4m3u8":{"show":"松鼠资源4","des":"支持手机电脑在线播放","ps":"0","parse":""},"ss3m3u8":{"show":"松鼠资源3","des":"支持手机电脑在线播放","ps":"0","parse":""},"ss2m3u8":{"show":"松鼠资源2","des":"支持手机电脑在线播放","ps":"0","parse":""},"ss1m3u8":{"show":"松鼠资源1","des":"支持手机电脑在线播放","ps":"0","parse":""},"jinyingm3u8":{"show":"金鹰资源②","des":"支持手机电脑在线播放","ps":"0","parse":""},"cmpyun":{"show":"冠军资源①","des":"支持手机电脑在线播放","ps":"0","parse":""},"kcm3u8":{"show":"快车资源①","des":"支持手机电脑在线播放","ps":"0","parse":""},"xlm3u8":{"show":"新浪资源2","des":"支持手机电脑在线播放","ps":"0","parse":""},"ssyun":{"show":"神速资源1","des":"支持手机电脑在线播放","ps":"0","parse":""},"ssm3u8":{"show":"神速资源2","des":"支持手机电脑在线播放","ps":"0","parse":""},"wolong":{"show":"卧龙资源","des":"支持手机电脑在线播放","ps":"1","parse":"https://vip.2ktvb.com/?url="},"ptzy":{"show":"葡萄资源","des":"支持手机电脑在线播放","ps":"0","parse":""},"zgzy":{"show":"猪哥播放器","des":"支持手机电脑在线播放","ps":"0","parse":""},"ukm3u8":{"show":"U酷点播","des":"支持手机电脑在线播放","ps":"0","parse":""},"fsm3u8":{"show":"飞速播放器","des":"支持手机电脑在线播放","ps":"0","parse":""},"mim3u8":{"show":"大米播放器","des":"支持手机电脑在线播放","ps":"0","parse":""},"if101":{"show":"if101播放器","des":"支持手机电脑在线播放","ps":"0","parse":""},"sgm3u8":{"show":"速更播放器","des":"支持手机电脑在线播放","ps":"0","parse":""},"kdm3u8":{"show":"酷点播放器","des":"支持手机电脑在线播放","ps":"0","parse":""},"xiuse":{"show":"秀色播放","des":"支持手机电脑在线播放","ps":"0","parse":""},"swm3u8":{"show":"丝袜播放器","des":"支持手机电脑在线播放","ps":"0","parse":""},"bdxm3u8":{"show":"北斗星m3u8","des":"支持手机电脑在线播放","ps":"0","parse":""},"hjm3u8":{"show":"花椒播放器","des":"支持手机电脑在线播放","ps":"0","parse":""},"kbzy":{"show":"快播云播","des":"支持手机电脑在线播放","ps":"0","parse":""},"88zym3u8":{"show":"88在线","des":"支持手机电脑在线播放","ps":"0","parse":""},"lezy":{"show":"乐库云播","des":"支持手机电脑在线播放","ps":"0","parse":""},"kkyun":{"show":"酷酷云播","des":"支持手机电脑在线播放","ps":"0","parse":""},"kkm3u8":{"show":"KK在线","des":"支持手机电脑在线播放","ps":"0","parse":""},"tpm3u8":{"show":"淘片播放器","des":"支持手机电脑在线播放","ps":"0","parse":""},"ckm3u8":{"show":"ck资源","des":"支持手机电脑在线播放","ps":"0","parse":""},"bjyun":{"show":"八戒云播","des":"支持手机电脑在线播放","ps":"0","parse":""},"gsm3u8":{"show":"光速云资源②","des":"支持手机电脑在线播放","ps":"0","parse":""},"m3u8":{"show":"m3u8在线","des":"支持手机电脑在线播放","ps":"0","parse":""},"videojs":{"show":"videojs-H5播放器","des":"videojs.com","ps":"0","parse":""},"iva":{"show":"iva-H5播放器","des":"videojj.com","ps":"0","parse":""},"iframe":{"show":"外链数据","des":"iframe外链数据","ps":"0","parse":""},"link":{"show":"外链数据","des":"外部网站播放链接","ps":"0","parse":""},"swf":{"show":"Flash文件","des":"swf","ps":"0","parse":""},"flv":{"show":"Flv文件","des":"flv","ps":"0","parse":""},"pptv":{"show":"PPTV","des":"pptv","ps":"1","parse":"https://vip.2ktvb.com/player/sg.php?url="},"migu":{"show":"咪咕","des":"migu","ps":"0","parse":"https://vip.2ktvb.com/player/sg.php?url="},"cctv":{"show":"cctv","des":"cctv","ps":"1","parse":"https://vip.2ktvb.com/player/sg.php?url="},"cntv":{"show":"cntv","des":"cntv","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"funshion":{"show":"风行","des":"funshion","ps":"1","parse":"hhttps://vip.2ktvb.com/player/sg.php?url="},"wasu":{"show":"华数","des":"wasu","ps":"1","parse":"https://vip.2ktvb.com/player/sg.php?url="},"605m3u8":{"show":"605线","des":"支持手机电脑在线播放","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"bjm3u8":{"show":"八戒","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"dbm3u8":{"show":"百度线","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"hnm3u8":{"show":"牛牛线","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"igen":{"show":"爱跟线","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"kbm3u8":{"show":"快播线","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"lajiao":{"show":"辣椒","des":"","ps":"1","parse":"https://lajiaoapi.com/watch?url="},"tkm3u8":{"show":"天空线","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"tsm3u8":{"show":"Ts线","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"wjm3u8":{"show":"无尽线","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"xigua":{"show":"西瓜线","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/sg.php?url="},"xkm3u8":{"show":"想看线","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"jhyun":{"show":"聚合云","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"sdm3u8":{"show":"闪电线","des":"支持手机电脑在线播放","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"ddzy":{"show":"极速多线","des":"","ps":"1","parse":"https://bo.dd520.cc//xmplayer/?url="},"jscq":{"show":"极速超清","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?xf=languang&url="},"jslg":{"show":"极速蓝光","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?xf=languang&url="}}, + "filter": {"dianying":[{"key":3,"name":"分类","value":[{"n":"全部","v":""},{"n":"喜剧","v":"喜剧"},{"n":"动作","v":"动作"},{"n":"爱情","v":"爱情"},{"n":"惊悚","v":"惊悚"},{"n":"犯罪","v":"犯罪"},{"n":"冒险","v":"冒险"},{"n":"科幻","v":"科幻"},{"n":"悬疑","v":"悬疑"},{"n":"剧情","v":"剧情"},{"n":"动画","v":"动画"},{"n":"仙侠","v":"仙侠"},{"n":"武侠","v":"武侠"},{"n":"战争","v":"战争"},{"n":"歌舞","v":"歌舞"},{"n":"奇幻","v":"奇幻"},{"n":"传记","v":"传记"},{"n":"警匪","v":"警匪"},{"n":"历史","v":"历史"},{"n":"运动","v":" 运动"},{"n":"伦理","v":"伦理"},{"n":"灾难","v":"灾难"},{"n":"西部","v":"西部"},{"n":"魔幻","v":"魔幻"},{"n":"枪战","v":"枪战"},{"n":"恐怖","v":"恐怖"},{"n":"记录","v":"记录"},{"n":"情色","v":"情色"}]},{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"},{"n":"美国","v":"美国"},{"n":"香港","v":"香港"},{"n":"韩国","v":"韩国"},{"n":"英国","v":"英国"},{"n":"台湾","v":"台湾"},{"n":"日本","v":"日本"},{"n":"法国","v":"法国"},{"n":"意大利","v":"意大利"},{"n":"德国","v":"德国"},{"n":"西班牙","v":"西班牙"},{"n":"泰国","v":"泰国"},{"n":"其它","v":"其它"}]},{"key":4,"name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"法语","v":"法语"},{"n":"德语","v":"德语"},{"n":"其它","v":"其它"}]},{"key":11,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"}]},{"key":5,"name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":2,"name":"排序","value":[{"n":"最新","v":"time"},{"n":"最热","v":"hits"},{"n":"评分","v":"score"}]}],"lianxuju":[{"key":3,"name":"分类","value":[{"n":" 全部","v":""},{"n":"古装","v":"古装"},{"n":"动作","v":"动作"},{"n":"都市","v":"都市"},{"n":"偶像","v":"偶像"},{"n":"家庭","v":"家庭"},{"n":"警匪","v":"警匪"},{"n":"言情","v":"言情"},{"n":"军事","v":"军事"},{"n":"武侠","v":"武侠"},{"n":"悬疑","v":"悬疑"},{"n":"历史","v":"历史"},{"n":"农村","v":"农村"},{"n":"都市","v":"都市"},{"n":"神话","v":"神话"},{"n":"科幻","v":"科幻"},{"n":"少儿","v":"少儿"},{"n":"搞笑","v":"搞笑"},{"n":"谍战","v":"谍战"},{"n":"战争","v":"战争"},{"n":"年代","v":"年代"},{"n":"犯罪","v":"犯 罪"},{"n":"恐怖","v":"恐怖"},{"n":"惊悚","v":"惊悚"},{"n":"爱情","v":"爱情"},{"n":"剧情","v":"剧情"},{"n":"奇幻","v":"奇幻"},{"n":"仙侠","v":"仙侠"}]},{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"},{"n":"韩国","v":"韩国"},{"n":"香港","v":"香港"},{"n":"台湾","v":"台湾"},{"n":"日本","v":"日本"},{"n":"美国","v":"美国"},{"n":"泰国","v":"泰国"},{"n":"英国","v":"英国"},{"n":"新加坡","v":"新加坡"}]},{"key":4,"name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":11,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"}]},{"key":5,"name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":2,"name":"排序","value":[{"n":"最新","v":"time"},{"n":"最热","v":"hits"},{"n":"评分","v":"score"}]}],"dongman":[{"key":3,"name":"分类","value":[{"n":"全部","v":""},{"n":"番剧","v":"番剧"},{"n":"国创","v":"国创"},{"n":"热血","v":"热血"},{"n":"科幻","v":"科幻"},{"n":"动画","v":"动画"},{"n":"仙侠","v":"仙侠"},{"n":"修仙","v":"修仙"},{"n":"推理","v":"推理"},{"n":"搞笑","v":"搞笑"},{"n":"冒险","v":"冒险"},{"n":"校园","v":"校园"},{"n":"动作","v":"动作"},{"n":"机战","v":"机战"},{"n":"运动","v":"运动"},{"n":"战争","v":"战争"},{"n":"少年","v":"少年"},{"n":"少女","v":"少女"},{"n":"社会","v":"社会"},{"n":"原创","v":"原创"},{"n":"亲子","v":"亲子"},{"n":"益智","v":"益智"},{"n":"励志","v":"励志"},{"n":"其他","v":"其他"}]},{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"},{"n":"日本","v":"日本"},{"n":"欧美","v":"欧美"},{"n":"其他","v":"其他"}]},{"key":4,"name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":11,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"}]},{"key":5,"name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":2,"name":"排序","value":[{"n":"最新","v":"time"},{"n":"最热","v":"hits"},{"n":"评分","v":"score"}]}],"zongyi":[{"key":3,"name":"分类","value":[{"n":"全部","v":""},{"n":"真人秀","v":"真人秀"},{"n":"访谈","v":"访谈"},{"n":"情感","v":"情感"},{"n":"选秀","v":"选秀"},{"n":"旅游","v":"旅游"},{"n":"美食","v":"美食"},{"n":"口秀","v":"口秀"},{"n":"曲艺","v":"曲艺"},{"n":"搞笑","v":"搞笑"},{"n":"游戏","v":"游戏"},{"n":"歌舞","v":"歌舞"},{"n":"生活","v":"生活"},{"n":"音乐","v":"音乐"},{"n":"时尚","v":"时尚"},{"n":"益智","v":"益智"},{"n":"职场","v":"职场"},{"n":"少儿","v":"少儿"},{"n":"纪实","v":"纪实"},{"n":"盛会","v":"盛会"},{"n":"音乐MV","v":"音乐MV"}]},{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"},{"n":"韩国","v":"韩国"},{"n":"香港","v":"香港"},{"n":"台湾","v":"台湾"},{"n":"美国","v":"美国"},{"n":"其它","v":"其它"}]},{"key":4,"name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":11,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"}]},{"key":5,"name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":2,"name":"排序","value":[{"n":"最新","v":"time"},{"n":"最热","v":"hits"},{"n":"评分","v":"score"}]}],"shaoer":[{"key":3,"name":"分类","value":[{"n":"全部","v":""},{"n":"历险","v":"历险"},{"n":"奇幻","v":"奇幻"},{"n":"教育","v":"教 育"},{"n":"搞笑","v":"搞笑"},{"n":"教育","v":"教育"},{"n":"益智","v":"益智"}]},{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"},{"n":"美国","v":"美国"},{"n":"香港","v":"香港"},{"n":"韩国","v":"韩国"},{"n":"英国","v":"英国"},{"n":"台湾","v":"台湾"},{"n":"日本","v":"日本"},{"n":"法国","v":"法国"},{"n":"意大利","v":"意大利"},{"n":"德国","v":"德国"},{"n":"西班牙","v":"西班牙"},{"n":"泰国","v":"泰国"},{"n":"其它","v":"其它"}]},{"key":4,"name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"法语","v":"法语"},{"n":"德语","v":"德语"},{"n":"其它","v":"其它"}]},{"key":11,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"}]},{"key":5,"name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":2,"name":"排序","value":[{"n":"最新","v":"time"},{"n":"最热","v":"hits"},{"n":"评分","v":"score"}]}],"yinyue":[{"key":3,"name":"分类","value":[{"n":"全部","v":""},{"n":"MV","v":"MV"},{"n":"演唱会","v":"演唱会"},{"n":"音频","v":"音频"}]},{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"},{"n":"韩国","v":"韩国"},{"n":"香港","v":"香港"},{"n":"台湾","v":"台湾"}]},{"key":4,"name":"语言","value":[{"n":"全部","v":""},{"n":"韩语","v":"韩语"},{"n":"粤语","v":"粤语"},{"n":"日语","v":"日语"},{"n":"英语","v":"英语"},{"n":"泰语","v":"泰语"},{"n":"国语","v":"国语"}]},{"key":11,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"}]},{"key":5,"name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":2,"name":"排序","value":[{"n":"最新","v":"time"},{"n":"最热","v":"hits"},{"n":"评分","v":"score"}]}]} + } + header = { + 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.81 Safari/537.36 Edg/104.0.1293.47' + } + + def localProxy(self,param): + return [200, "video/MP2T", action, ""] \ No newline at end of file diff --git a/py/plugin/py_genmov_1.json b/py/plugin/py_genmov_1.json new file mode 100644 index 0000000..b00249b --- /dev/null +++ b/py/plugin/py_genmov_1.json @@ -0,0 +1,202 @@ +#coding=utf-8 +#!/usr/bin/python +import sys +sys.path.append('..') +from base.spider import Spider +import json + +class Spider(Spider): # 元类 默认的元类 type + def getName(self): + return "我爱跟剧" + def init(self,extend=""): + print("============{0}============".format(extend)) + pass + def isVideoFormat(self,url): + pass + def manualVideoCheck(self): + pass + def homeContent(self,filter): + # genmov + # https://www.genmov.com/v/yinyue.html + result = {} + cateManual = { + "电影":"dianying", + "连续剧":"lianxuju", + "动漫":"dongman", + "综艺":"zongyi", + "少儿":"shaoer", + "音乐":"yinyue" + } + classes = [] + for k in cateManual: + classes.append({ + 'type_name':k, + 'type_id':cateManual[k] + }) + result['class'] = classes + if(filter): + result['filters'] = self.config['filter'] + return result + def homeVideoContent(self): + rsp = self.fetch("https://www.genmov.com/",headers=self.header) + root = self.html(rsp.text) + aList = root.xpath("//div[@class='module module-wrapper']//div[@class='module-item']") + videos = [] + for a in aList: + name = a.xpath(".//div[@class='module-item-pic']/a/@title")[0] + pic = a.xpath(".//div[@class='module-item-pic']/img/@data-src")[0] + mark = a.xpath("./div[@class='module-item-text']/text()")[0] + sid = a.xpath(".//div[@class='module-item-pic']/a/@href")[0] + sid = self.regStr(sid,"/video/(\\S+).html") + videos.append({ + "vod_id":sid, + "vod_name":name, + "vod_pic":pic, + "vod_remarks":mark + }) + result = { + 'list':videos + } + return result + def categoryContent(self,tid,pg,filter,extend): + result = {} + urlParams = ["", "", "", "", "", "", "", "", "", "", "", ""] + urlParams[0] = tid + urlParams[8] = pg + for key in extend: + urlParams[int(key)] = extend[key] + params = '-'.join(urlParams) + url = 'https://www.genmov.com/vodshow/{0}.html'.format(params) + rsp = self.fetch(url,headers=self.header) + root = self.html(rsp.text) + aList = root.xpath("//div[@class='module-items']/div[@class='module-item']") + videos = [] + for a in aList: + name = a.xpath(".//div[@class='module-item-pic']/a/@title")[0] + pic = a.xpath(".//div[@class='module-item-pic']/img/@data-src")[0] + mark = a.xpath("./div[@class='module-item-text']/text()")[0] + sid = a.xpath(".//div[@class='module-item-pic']/a/@href")[0] + sid = self.regStr(sid,"/video/(\\S+).html") + videos.append({ + "vod_id":sid, + "vod_name":name, + "vod_pic":pic, + "vod_remarks":mark + }) + result['list'] = videos + result['page'] = pg + result['pagecount'] = 9999 + result['limit'] = 90 + result['total'] = 999999 + return result + def detailContent(self,array): + # video-info-header + tid = array[0] + url = 'https://www.genmov.com/video/{0}.html'.format(tid) + rsp = self.fetch(url,headers=self.header) + root = self.html(rsp.text) + title = root.xpath(".//h1[@class='page-title']/text()")[0] + pic = root.xpath(".//div[@class='video-cover']//img/@data-src")[0] + vod = { + "vod_id":tid, + "vod_name":title, + "vod_pic":pic, + "type_name":"", + "vod_year":"", + "vod_area":"", + "vod_remarks":"", + "vod_actor":"", + "vod_director":"", + "vod_content":"" + } + infoArray = root.xpath(".//div[@class='video-info-items']") + for info in infoArray: + content = info.xpath('string(.)') + # if content.startswith('类型'): + # vod['type_name'] = content + # if content.startswith('年份'): + # vod['vod_year'] = content + # if content.startswith('地区'): + # vod['vod_area'] = content + if content.startswith('集数'): + vod['vod_remarks'] = content + if content.startswith('主演'): + vod['vod_actor'] = content + if content.startswith('导演'): + vod['vod_director'] = content + if content.startswith('剧情'): + vod['vod_content'] = content + + vod_play_from = '$$$' + playFrom = [] + vodHeader = root.xpath(".//main[@id='main']//div[@class='module-heading']//div[contains(@class,'module-tab-item')]/span/text()") + for v in vodHeader: + playFrom.append(v) + vod_play_from = vod_play_from.join(playFrom) + + vod_play_url = '$$$' + playList = [] + vodList = root.xpath(".//main[@id='main']//div[contains(@class,'module-list')]//div[@class='sort-item']") + for vl in vodList: + vodItems = [] + aList = vl.xpath('./a') + for tA in aList: + href = tA.xpath('./@href')[0] + name = tA.xpath('./span/text()')[0] + tId = self.regStr(href,'/play/(\\S+).html') + vodItems.append(name + "$" + tId) + joinStr = '#' + joinStr = joinStr.join(vodItems) + playList.append(joinStr) + vod_play_url = vod_play_url.join(playList) + + vod['vod_play_from'] = vod_play_from + vod['vod_play_url'] = vod_play_url + + result = { + 'list':[ + vod + ] + } + return result + def searchContent(self,key,quick): + result = {} + return result + def playerContent(self,flag,id,vipFlags): + # https://www.genmov.com/play/301475-1-1.html + # https://www.genmov.com/static/js/playerconfig.js + url = 'https://www.genmov.com/play/{0}.html'.format(id) + rsp = self.fetch(url,headers=self.header) + root = self.html(rsp.text) + scripts = root.xpath("//script/text()") + jo = {} + for script in scripts: + if(script.startswith("var player_")): + target = script[script.index('{'):] + jo = json.loads(target) + break; + result = {} + parseUrl = "" + playerConfig = self.config['player'] + if jo['from'] in self.config['player']: + parser = self.config['player'][jo['from']] + originUrl = jo['url'] + parseUrl = parser['parse'] + + result["parse"] = parser['ps'] + result["playUrl"] = parseUrl + result["url"] = originUrl + result["header"] = '' + return result + + cookie = {} + config = { + "player": {"dplayer":{"show":"默认","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"qqy":{"show":"预告专用","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"qiyi":{"show":"爱奇艺","des":"qiyi.com","ps":"1","parse":"https://vip.2ktvb.com/player/sg.php?url="},"youku":{"show":"优酷","des":"youku.com","ps":"1","parse":"https://vip.2ktvb.com/player/sg.php?url="},"qq":{"show":"腾讯","des":"qq.com","ps":"1","parse":"https://vip.2ktvb.com/player/sg.php?url="},"mgtv":{"show":"芒果","des":"mgtv.com","ps":"1","parse":"https://vip.2ktvb.com/player/sg.php?url="},"letv":{"show":"乐视","des":"","ps":"1","parse":"https://jx.quanmingjiexi.com/?url="},"m1905":{"show":"电影网","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/sg.php?url="},"bilibili":{"show":"哔哩哔哩","des":"","ps":"1","parse":"https://jx.bozrc.com:4433/player/?url="},"sohu":{"show":"搜狐","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/sg.php?url="},"lzm3u8":{"show":"量子资源1","des":"支持手机电脑在线播放","ps":"0","parse":""},"ss4m3u8":{"show":"松鼠资源4","des":"支持手机电脑在线播放","ps":"0","parse":""},"ss3m3u8":{"show":"松鼠资源3","des":"支持手机电脑在线播放","ps":"0","parse":""},"ss2m3u8":{"show":"松鼠资源2","des":"支持手机电脑在线播放","ps":"0","parse":""},"ss1m3u8":{"show":"松鼠资源1","des":"支持手机电脑在线播放","ps":"0","parse":""},"jinyingm3u8":{"show":"金鹰资源②","des":"支持手机电脑在线播放","ps":"0","parse":""},"cmpyun":{"show":"冠军资源①","des":"支持手机电脑在线播放","ps":"0","parse":""},"kcm3u8":{"show":"快车资源①","des":"支持手机电脑在线播放","ps":"0","parse":""},"xlm3u8":{"show":"新浪资源2","des":"支持手机电脑在线播放","ps":"0","parse":""},"ssyun":{"show":"神速资源1","des":"支持手机电脑在线播放","ps":"0","parse":""},"ssm3u8":{"show":"神速资源2","des":"支持手机电脑在线播放","ps":"0","parse":""},"wolong":{"show":"卧龙资源","des":"支持手机电脑在线播放","ps":"1","parse":"https://vip.2ktvb.com/?url="},"ptzy":{"show":"葡萄资源","des":"支持手机电脑在线播放","ps":"0","parse":""},"zgzy":{"show":"猪哥播放器","des":"支持手机电脑在线播放","ps":"0","parse":""},"ukm3u8":{"show":"U酷点播","des":"支持手机电脑在线播放","ps":"0","parse":""},"fsm3u8":{"show":"飞速播放器","des":"支持手机电脑在线播放","ps":"0","parse":""},"mim3u8":{"show":"大米播放器","des":"支持手机电脑在线播放","ps":"0","parse":""},"if101":{"show":"if101播放器","des":"支持手机电脑在线播放","ps":"0","parse":""},"sgm3u8":{"show":"速更播放器","des":"支持手机电脑在线播放","ps":"0","parse":""},"kdm3u8":{"show":"酷点播放器","des":"支持手机电脑在线播放","ps":"0","parse":""},"xiuse":{"show":"秀色播放","des":"支持手机电脑在线播放","ps":"0","parse":""},"swm3u8":{"show":"丝袜播放器","des":"支持手机电脑在线播放","ps":"0","parse":""},"bdxm3u8":{"show":"北斗星m3u8","des":"支持手机电脑在线播放","ps":"0","parse":""},"hjm3u8":{"show":"花椒播放器","des":"支持手机电脑在线播放","ps":"0","parse":""},"kbzy":{"show":"快播云播","des":"支持手机电脑在线播放","ps":"0","parse":""},"88zym3u8":{"show":"88在线","des":"支持手机电脑在线播放","ps":"0","parse":""},"lezy":{"show":"乐库云播","des":"支持手机电脑在线播放","ps":"0","parse":""},"kkyun":{"show":"酷酷云播","des":"支持手机电脑在线播放","ps":"0","parse":""},"kkm3u8":{"show":"KK在线","des":"支持手机电脑在线播放","ps":"0","parse":""},"tpm3u8":{"show":"淘片播放器","des":"支持手机电脑在线播放","ps":"0","parse":""},"ckm3u8":{"show":"ck资源","des":"支持手机电脑在线播放","ps":"0","parse":""},"bjyun":{"show":"八戒云播","des":"支持手机电脑在线播放","ps":"0","parse":""},"gsm3u8":{"show":"光速云资源②","des":"支持手机电脑在线播放","ps":"0","parse":""},"m3u8":{"show":"m3u8在线","des":"支持手机电脑在线播放","ps":"0","parse":""},"videojs":{"show":"videojs-H5播放器","des":"videojs.com","ps":"0","parse":""},"iva":{"show":"iva-H5播放器","des":"videojj.com","ps":"0","parse":""},"iframe":{"show":"外链数据","des":"iframe外链数据","ps":"0","parse":""},"link":{"show":"外链数据","des":"外部网站播放链接","ps":"0","parse":""},"swf":{"show":"Flash文件","des":"swf","ps":"0","parse":""},"flv":{"show":"Flv文件","des":"flv","ps":"0","parse":""},"pptv":{"show":"PPTV","des":"pptv","ps":"1","parse":"https://vip.2ktvb.com/player/sg.php?url="},"migu":{"show":"咪咕","des":"migu","ps":"0","parse":"https://vip.2ktvb.com/player/sg.php?url="},"cctv":{"show":"cctv","des":"cctv","ps":"1","parse":"https://vip.2ktvb.com/player/sg.php?url="},"cntv":{"show":"cntv","des":"cntv","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"funshion":{"show":"风行","des":"funshion","ps":"1","parse":"hhttps://vip.2ktvb.com/player/sg.php?url="},"wasu":{"show":"华数","des":"wasu","ps":"1","parse":"https://vip.2ktvb.com/player/sg.php?url="},"605m3u8":{"show":"605线","des":"支持手机电脑在线播放","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"bjm3u8":{"show":"八戒","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"dbm3u8":{"show":"百度线","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"hnm3u8":{"show":"牛牛线","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"igen":{"show":"爱跟线","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"kbm3u8":{"show":"快播线","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"lajiao":{"show":"辣椒","des":"","ps":"1","parse":"https://lajiaoapi.com/watch?url="},"tkm3u8":{"show":"天空线","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"tsm3u8":{"show":"Ts线","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"wjm3u8":{"show":"无尽线","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"xigua":{"show":"西瓜线","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/sg.php?url="},"xkm3u8":{"show":"想看线","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"jhyun":{"show":"聚合云","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"sdm3u8":{"show":"闪电线","des":"支持手机电脑在线播放","ps":"1","parse":"https://vip.2ktvb.com/player/?url="},"ddzy":{"show":"极速多线","des":"","ps":"1","parse":"https://bo.dd520.cc//xmplayer/?url="},"jscq":{"show":"极速超清","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?xf=languang&url="},"jslg":{"show":"极速蓝光","des":"","ps":"1","parse":"https://vip.2ktvb.com/player/?xf=languang&url="}}, + "filter": {"dianying":[{"key":3,"name":"分类","value":[{"n":"全部","v":""},{"n":"喜剧","v":"喜剧"},{"n":"动作","v":"动作"},{"n":"爱情","v":"爱情"},{"n":"惊悚","v":"惊悚"},{"n":"犯罪","v":"犯罪"},{"n":"冒险","v":"冒险"},{"n":"科幻","v":"科幻"},{"n":"悬疑","v":"悬疑"},{"n":"剧情","v":"剧情"},{"n":"动画","v":"动画"},{"n":"仙侠","v":"仙侠"},{"n":"武侠","v":"武侠"},{"n":"战争","v":"战争"},{"n":"歌舞","v":"歌舞"},{"n":"奇幻","v":"奇幻"},{"n":"传记","v":"传记"},{"n":"警匪","v":"警匪"},{"n":"历史","v":"历史"},{"n":"运动","v":" 运动"},{"n":"伦理","v":"伦理"},{"n":"灾难","v":"灾难"},{"n":"西部","v":"西部"},{"n":"魔幻","v":"魔幻"},{"n":"枪战","v":"枪战"},{"n":"恐怖","v":"恐怖"},{"n":"记录","v":"记录"},{"n":"情色","v":"情色"}]},{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"},{"n":"美国","v":"美国"},{"n":"香港","v":"香港"},{"n":"韩国","v":"韩国"},{"n":"英国","v":"英国"},{"n":"台湾","v":"台湾"},{"n":"日本","v":"日本"},{"n":"法国","v":"法国"},{"n":"意大利","v":"意大利"},{"n":"德国","v":"德国"},{"n":"西班牙","v":"西班牙"},{"n":"泰国","v":"泰国"},{"n":"其它","v":"其它"}]},{"key":4,"name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"法语","v":"法语"},{"n":"德语","v":"德语"},{"n":"其它","v":"其它"}]},{"key":11,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"}]},{"key":5,"name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":2,"name":"排序","value":[{"n":"最新","v":"time"},{"n":"最热","v":"hits"},{"n":"评分","v":"score"}]}],"lianxuju":[{"key":3,"name":"分类","value":[{"n":" 全部","v":""},{"n":"古装","v":"古装"},{"n":"动作","v":"动作"},{"n":"都市","v":"都市"},{"n":"偶像","v":"偶像"},{"n":"家庭","v":"家庭"},{"n":"警匪","v":"警匪"},{"n":"言情","v":"言情"},{"n":"军事","v":"军事"},{"n":"武侠","v":"武侠"},{"n":"悬疑","v":"悬疑"},{"n":"历史","v":"历史"},{"n":"农村","v":"农村"},{"n":"都市","v":"都市"},{"n":"神话","v":"神话"},{"n":"科幻","v":"科幻"},{"n":"少儿","v":"少儿"},{"n":"搞笑","v":"搞笑"},{"n":"谍战","v":"谍战"},{"n":"战争","v":"战争"},{"n":"年代","v":"年代"},{"n":"犯罪","v":"犯 罪"},{"n":"恐怖","v":"恐怖"},{"n":"惊悚","v":"惊悚"},{"n":"爱情","v":"爱情"},{"n":"剧情","v":"剧情"},{"n":"奇幻","v":"奇幻"},{"n":"仙侠","v":"仙侠"}]},{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"},{"n":"韩国","v":"韩国"},{"n":"香港","v":"香港"},{"n":"台湾","v":"台湾"},{"n":"日本","v":"日本"},{"n":"美国","v":"美国"},{"n":"泰国","v":"泰国"},{"n":"英国","v":"英国"},{"n":"新加坡","v":"新加坡"}]},{"key":4,"name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":11,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"}]},{"key":5,"name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":2,"name":"排序","value":[{"n":"最新","v":"time"},{"n":"最热","v":"hits"},{"n":"评分","v":"score"}]}],"dongman":[{"key":3,"name":"分类","value":[{"n":"全部","v":""},{"n":"番剧","v":"番剧"},{"n":"国创","v":"国创"},{"n":"热血","v":"热血"},{"n":"科幻","v":"科幻"},{"n":"动画","v":"动画"},{"n":"仙侠","v":"仙侠"},{"n":"修仙","v":"修仙"},{"n":"推理","v":"推理"},{"n":"搞笑","v":"搞笑"},{"n":"冒险","v":"冒险"},{"n":"校园","v":"校园"},{"n":"动作","v":"动作"},{"n":"机战","v":"机战"},{"n":"运动","v":"运动"},{"n":"战争","v":"战争"},{"n":"少年","v":"少年"},{"n":"少女","v":"少女"},{"n":"社会","v":"社会"},{"n":"原创","v":"原创"},{"n":"亲子","v":"亲子"},{"n":"益智","v":"益智"},{"n":"励志","v":"励志"},{"n":"其他","v":"其他"}]},{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"},{"n":"日本","v":"日本"},{"n":"欧美","v":"欧美"},{"n":"其他","v":"其他"}]},{"key":4,"name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":11,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"}]},{"key":5,"name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":2,"name":"排序","value":[{"n":"最新","v":"time"},{"n":"最热","v":"hits"},{"n":"评分","v":"score"}]}],"zongyi":[{"key":3,"name":"分类","value":[{"n":"全部","v":""},{"n":"真人秀","v":"真人秀"},{"n":"访谈","v":"访谈"},{"n":"情感","v":"情感"},{"n":"选秀","v":"选秀"},{"n":"旅游","v":"旅游"},{"n":"美食","v":"美食"},{"n":"口秀","v":"口秀"},{"n":"曲艺","v":"曲艺"},{"n":"搞笑","v":"搞笑"},{"n":"游戏","v":"游戏"},{"n":"歌舞","v":"歌舞"},{"n":"生活","v":"生活"},{"n":"音乐","v":"音乐"},{"n":"时尚","v":"时尚"},{"n":"益智","v":"益智"},{"n":"职场","v":"职场"},{"n":"少儿","v":"少儿"},{"n":"纪实","v":"纪实"},{"n":"盛会","v":"盛会"},{"n":"音乐MV","v":"音乐MV"}]},{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"},{"n":"韩国","v":"韩国"},{"n":"香港","v":"香港"},{"n":"台湾","v":"台湾"},{"n":"美国","v":"美国"},{"n":"其它","v":"其它"}]},{"key":4,"name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"其它","v":"其它"}]},{"key":11,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"}]},{"key":5,"name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":2,"name":"排序","value":[{"n":"最新","v":"time"},{"n":"最热","v":"hits"},{"n":"评分","v":"score"}]}],"shaoer":[{"key":3,"name":"分类","value":[{"n":"全部","v":""},{"n":"历险","v":"历险"},{"n":"奇幻","v":"奇幻"},{"n":"教育","v":"教 育"},{"n":"搞笑","v":"搞笑"},{"n":"教育","v":"教育"},{"n":"益智","v":"益智"}]},{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"},{"n":"美国","v":"美国"},{"n":"香港","v":"香港"},{"n":"韩国","v":"韩国"},{"n":"英国","v":"英国"},{"n":"台湾","v":"台湾"},{"n":"日本","v":"日本"},{"n":"法国","v":"法国"},{"n":"意大利","v":"意大利"},{"n":"德国","v":"德国"},{"n":"西班牙","v":"西班牙"},{"n":"泰国","v":"泰国"},{"n":"其它","v":"其它"}]},{"key":4,"name":"语言","value":[{"n":"全部","v":""},{"n":"国语","v":"国语"},{"n":"英语","v":"英语"},{"n":"粤语","v":"粤语"},{"n":"闽南语","v":"闽南语"},{"n":"韩语","v":"韩语"},{"n":"日语","v":"日语"},{"n":"法语","v":"法语"},{"n":"德语","v":"德语"},{"n":"其它","v":"其它"}]},{"key":11,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"}]},{"key":5,"name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":2,"name":"排序","value":[{"n":"最新","v":"time"},{"n":"最热","v":"hits"},{"n":"评分","v":"score"}]}],"yinyue":[{"key":3,"name":"分类","value":[{"n":"全部","v":""},{"n":"MV","v":"MV"},{"n":"演唱会","v":"演唱会"},{"n":"音频","v":"音频"}]},{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"大陆","v":"大陆"},{"n":"韩国","v":"韩国"},{"n":"香港","v":"香港"},{"n":"台湾","v":"台湾"}]},{"key":4,"name":"语言","value":[{"n":"全部","v":""},{"n":"韩语","v":"韩语"},{"n":"粤语","v":"粤语"},{"n":"日语","v":"日语"},{"n":"英语","v":"英语"},{"n":"泰语","v":"泰语"},{"n":"国语","v":"国语"}]},{"key":11,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"}]},{"key":5,"name":"字母","value":[{"n":"字母","v":""},{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":2,"name":"排序","value":[{"n":"最新","v":"time"},{"n":"最热","v":"hits"},{"n":"评分","v":"score"}]}]} + } + header = { + 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.81 Safari/537.36 Edg/104.0.1293.47' + } + + def localProxy(self,param): + return [200, "video/MP2T", action, ""] \ No newline at end of file diff --git a/py/plugin/py_gimytv.json b/py/plugin/py_gimytv.json new file mode 100644 index 0000000..669fced --- /dev/null +++ b/py/plugin/py_gimytv.json @@ -0,0 +1,216 @@ +#coding=utf-8 +#!/usr/bin/python +import sys +sys.path.append('..') +from base.spider import Spider +import json + +class Spider(Spider): # 元类 默认的元类 type + def getName(self): + return "剧迷" + def init(self,extend=""): + print("============{0}============".format(extend)) + pass + def isVideoFormat(self,url): + pass + def manualVideoCheck(self): + pass + def homeContent(self,filter): + # https://gimytv.co/ + result = {} + cateManual = { + "电影": "movies", + "电视剧": "tvseries", + "综艺": "tv_show", + "动漫": "anime" + } + classes = [] + for k in cateManual: + classes.append({ + 'type_name':k, + 'type_id':cateManual[k] + }) + result['class'] = classes + if(filter): + result['filters'] = self.config['filter'] + return result + def homeVideoContent(self): + rsp = self.fetch("https://gimytv.co/",headers=self.header) + root = self.html(rsp.text) + aList = root.xpath("//ul[@class='myui-vodlist clearfix']/li/div/a") + videos = [] + for a in aList: + name = a.xpath("./@title")[0] + pic = a.xpath("./@data-original")[0] + mark = a.xpath("./span[contains(@class, 'pic-text')]/text()")[0] + sid = a.xpath("./@href")[0] + sid = self.regStr(sid,"/(\\S+).html") + videos.append({ + "vod_id":sid, + "vod_name":name, + "vod_pic":pic, + "vod_remarks":mark + }) + result = { + 'list':videos + } + return result + def categoryContent(self,tid,pg,filter,extend): + result = {} + urlParams = ["", "", "", ""] + urlParams[0] = tid + urlParams[3] = pg + suffix = '' + for key in extend: + if key == 4: + suffix = '/by/'+extend[key] + else: + urlParams[int(key)] = extend[key] + params = '-'.join(urlParams)+suffix + # https://gimytv.co/genre/tvseries--2022-/by/hits_month.html + url = 'https://gimytv.com/genre/{0}.html'.format(params) + rsp = self.fetch(url,headers=self.header) + root = self.html(rsp.text) + aList = root.xpath("//ul[@class='myui-vodlist clearfix']/li/div/a") + videos = [] + for a in aList: + name = a.xpath("./@title")[0] + pic = a.xpath("./@data-original")[0] + mark = a.xpath("./span[contains(@class, 'pic-text')]/text()")[0] + sid = a.xpath("./@href")[0] + sid = self.regStr(sid,"/(\\S+).html") + videos.append({ + "vod_id":sid, + "vod_name":name, + "vod_pic":pic, + "vod_remarks":mark + }) + result['list'] = videos + result['page'] = pg + result['pagecount'] = 9999 + result['limit'] = 90 + result['total'] = 999999 + return result + def detailContent(self,array): + tid = array[0] + url = 'https://gimytv.co/{0}.html'.format(tid) + rsp = self.fetch(url,headers=self.header) + root = self.html(rsp.text) + node = root.xpath("//div[@class='container']")[0] + title = node.xpath(".//div[@class='myui-content__thumb']/a/@title")[0] + pic = node.xpath(".//div[@class='myui-content__thumb']/a/img/@data-original")[0] + vod = { + "vod_id":tid, + "vod_name":title, + "vod_pic":pic, + "type_name":"", + "vod_year":"", + "vod_area":"", + "vod_remarks":"", + "vod_actor":"", + "vod_director":"", + "vod_content":"" + } + infoArray = node.xpath(".//div[@class='myui-content__detail']/p") + for info in infoArray: + content = info.xpath('string(.)') + if content.startswith('分類'): + vod['type_name'] = content + # if content.startswith('年份'): + # vod['vod_year'] = content + # if content.startswith('地区'): + # vod['vod_area'] = content + if content.startswith('狀態'): + vod['vod_remarks'] = content + if content.startswith('主演'): + vod['vod_actor'] = content + if content.startswith('導演'): + vod['vod_director'] = content + # if content.startswith('剧情'): + # vod['vod_content'] = content + vod['vod_content'] = node.xpath(".//div[contains(@class,'col-pd')]/p/text()")[0] + + vod_play_from = '$$$' + playFrom = [] + vodHeader = root.xpath(".//div[@class='myui-panel_hd']/div/h3/text()[2]") + for v in vodHeader: + playFrom.append(v.strip()) + vod_play_from = vod_play_from.join(playFrom) + + vod_play_url = '$$$' + playList = [] + vodList = root.xpath(".//ul[contains(@class,'myui-content__list')]") + for vl in vodList: + vodItems = [] + aList = vl.xpath('./li/a') + for tA in aList: + href = tA.xpath('./@href')[0] + name = tA.xpath('./text()')[0] + tId = self.regStr(href,'/(\\S+).html') + vodItems.append(name + "$" + tId) + joinStr = '#' + joinStr = joinStr.join(vodItems) + playList.append(joinStr) + vod_play_url = vod_play_url.join(playList) + + vod['vod_play_from'] = vod_play_from + vod['vod_play_url'] = vod_play_url + + result = { + 'list':[ + vod + ] + } + return result + def searchContent(self,key,quick): + url = "https://gimytv.co/search/-------------.html?wd={0}".format(key) + rsp = self.fetch(url,headers=self.header) + root = self.html(rsp.text) + aList = root.xpath("//ul[contains(@class,'myui-vodlist__media')]/li") + videos = [] + for a in aList: + name = a.xpath(".//a/@title")[0] + pic = a.xpath(".//a/@data-original")[0] + mark = a.xpath(".//span[contains(@class, 'pic-text')]/text()")[0] + sid = a.xpath(".//a/@href")[0] + sid = self.regStr(sid,"/(\\S+).html") + videos.append({ + "vod_id":sid, + "vod_name":name, + "vod_pic":pic, + "vod_remarks":mark + }) + result = { + 'list':videos + } + return result + def playerContent(self,flag,id,vipFlags): + url = 'https://gimytv.co/{0}.html'.format(id) + rsp = self.fetch(url,headers=self.header) + root = self.html(rsp.text) + scripts = root.xpath("//script/text()") + jo = {} + for script in scripts: + if(script.startswith("var player_")): + target = script[script.index('{'):] + jo = json.loads(target) + break; + url = jo['url'] + result = {} + result["parse"] = 0 + result["playUrl"] = '' + result["url"] = url + result["header"] = '' + return result + + cookie = {} + config = { + "player": {}, + "filter": {"movies":[{"key":0,"name":"分类","value":[{"n":"全部","v":""},{"n":"劇情片","v":"drama"},{"n":"動作片","v":"action"},{"n":"科幻片","v":"scifi"},{"n":"喜劇片","v":"comedymovie"},{"n":"愛情片","v":"romance"},{"n":"戰爭片","v":"war"},{"n":"恐怖片","v":"horror"},{"n":"動畫電影","v":"animation"}]},{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"美國","v":"美國"},{"n":"歐美","v":"歐美"},{"n":"大陸","v":"大陸"},{"n":"中國大陸","v":"中國大陸"},{"n":"韓國","v":"韓國"},{"n":"香港","v":"香港"},{"n":"日本","v":"日本"},{"n":"英國","v":"英國"}]},{"key":2,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"}]},{"key":4,"name":"排序","value":[{"n":"按更新","v":"time"},{"n":"周人气","v":"hits_week"},{"n":"月人气","v":"hits_month"}]}],"tvseries":[{"key":0,"name":"分类","value":[{"n":"全部","v":""},{"n":"陸劇","v":"cn"},{"n":"韓劇","v":"kr"},{"n":"美劇","v":"us"},{"n":"日劇","v":"jp"},{"n":"台劇","v":"tw"},{"n":"港劇","v":"hks"},{"n":"海外劇","v":"ot"},{"n":"紀錄片","v":"documentary"}]},{"key":2,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"}]},{"key":4,"name":"排序","value":[{"n":"按更新","v":"time"},{"n":"周人气","v":"hits_week"},{"n":"月人气","v":"hits_month"}]}],"anime":[{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"日本","v":"日本"},{"n":"美國","v":"美國"},{"n":"歐美","v":"歐美"},{"n":"大陸","v":"大陸"},{"n":"臺灣","v":"臺灣"},{"n":"香港","v":"香港"}]},{"key":2,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"}]},{"key":4,"name":"排序","value":[{"n":"按更新","v":"time"},{"n":"周人气","v":"hits_week"},{"n":"月人气","v":"hits_month"}]}],"tv_show":[{"key":0,"name":"分类","value":[{"n":"全部","v":""},{"n":"纪录片","v":"28"}]},{"key":1,"name":"地区","value":[{"n":"全部","v":""},{"n":"大陸","v":"大陸"},{"n":"中國大陸","v":"中國大陸"},{"n":"韓國","v":"韓國"},{"n":"臺灣","v":"臺灣"},{"n":"美國","v":"美國"},{"n":"歐美","v":"歐美"},{"n":"日本","v":"日本"},{"n":"香港","v":"香港"}]},{"key":2,"name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"}]},{"key":4,"name":"排序","value":[{"n":"按更新","v":"time"},{"n":"周人气","v":"hits_week"},{"n":"月人气","v":"hits_month"}]}]} + } + header = { + 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.81 Safari/537.36 Edg/104.0.1293.47' + } + + def localProxy(self,param): + return [200, "video/MP2T", action, ""] \ No newline at end of file diff --git a/py/plugin/py_gitcafe.py b/py/plugin/py_gitcafe.py new file mode 100644 index 0000000..7f4c2f1 --- /dev/null +++ b/py/plugin/py_gitcafe.py @@ -0,0 +1,136 @@ +#coding=utf-8 +#!/usr/bin/python +import sys +sys.path.append('..') +from base.spider import Spider +import requests +import json + +class Spider(Spider): + def getDependence(self): + return ['py_ali'] + def getName(self): + return "py_gitcafe" + def init(self,extend): + self.ali = extend[0] + print("============py_gitcafe============") + pass + def isVideoFormat(self,url): + pass + def manualVideoCheck(self): + pass + def homeContent(self,filter): + result = {} + cateManual = { + "华语电视" :"hyds", + "日韩电视" :"rhds", + "欧美电视" :"omds", + "其他电视" :"qtds", + "华语电影" :"hydy", + "日韩电影" :"rhdy", + "欧美电影" :"omdy", + "其他电影" :"qtdy", + "华语动漫" :"hydm", + "日韩动漫" :"rhdm", + "欧美动漫" :"omdm", + "纪录片" :"jlp", + "综艺片" :"zyp", + "教育培训" :"jypx", + "其他视频" :"qtsp", + "华语音乐" :"hyyy", + "日韩音乐" :"rhyy", + "欧美音乐" :"omyy", + "其他音乐" :"qtyy" + } + classes = [] + for k in cateManual: + classes.append({ + 'type_name':k, + 'type_id':cateManual[k] + }) + result['class'] = classes + if filter: + result['filter'] = self.config['filter'] + return result + def homeVideoContent(self): + result = {} + if len(self.homeData.keys()) == 0: + url = self.baseUrl+'/alipaper/home.json' + self.homeData = self.fetch(url,headers=self.header).json() + cateList = self.homeData['data'] + videos = [] + for cate in cateList: + if cate['info']['code'] in self.category: + vodList = cate['data'] + for vod in vodList: + videos.append({ + "vod_id":"https://www.aliyundrive.com/s/" + vod['key'], + "vod_name":vod['title'], + "vod_pic":'https://txc.gtimg.com/data/375895/2022/0214/d6b96cc3799b6417d30e4715d2973f64.png', + "vod_remarks":'' + }) + result['list']=videos + return result + def categoryContent(self,tid,pg,filter,extend): + result = {} + url = self.baseUrl+'/tool/alipaper/' + form = { + "action": "viewcat", + "cat": tid, + "num":pg + } + + rsp = requests.post(url,headers=self.header,data=form) + vodList = json.loads(self.cleanText(rsp.text)) + videos = [] + for vod in vodList: + videos.append({ + "vod_id": 'https://www.aliyundrive.com/s/'+vod["key"], + "vod_name": vod["title"], + "vod_pic": "https://txc.gtimg.com/data/375895/2022/0214/d6b96cc3799b6417d30e4715d2973f64.png", + "vod_remarks": vod['cat'] + }) + result['list'] = videos + result['page'] = pg + result['pagecount'] = 9999 + result['limit'] = 90 + result['total'] = 999999 + return result + category = ['hydm','hyds','hydy','omdm','omds','omdy','rhdm','rhds','rhdy','qtds','qtdy','qtsp','jlp','zyp'] + def detailContent(self,array): + return self.ali.detailContent(array) + def searchContent(self,key,quick): + result = {} + url = self.baseUrl+'/tool/alipaper/' + form = { + "action": "search", + "keyword": key + } + vodList = requests.post(url,headers=self.header,data=form).json() + videos = [] + for vod in vodList: + videos.append({ + "vod_id": 'https://www.aliyundrive.com/s/'+vod["key"], + "vod_name": vod["title"], + "vod_pic": "https://txc.gtimg.com/data/375895/2022/0214/d6b96cc3799b6417d30e4715d2973f64.png", + "vod_remarks": vod['cat'] + }) + result = { + 'list':videos + } + return result + def playerContent(self,flag,id,vipFlags): + return self.ali.playerContent(flag,id,vipFlags) + + homeData = {} + baseUrl = 'https://gitcafe.net' + config = { + "player": {}, + "filter": {} + } + header = { + "User-Agent": "Mozilla/5.0 (Linux; Android 12; V2049A Build/SP1A.210812.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/103.0.5060.129 Mobile Safari/537.36", + "Referer": "https://u.gitcafe.net/" + } + def localProxy(self,param): + return [200, "video/MP2T", action, ""] \ No newline at end of file diff --git a/py/plugin/py_huya.json b/py/plugin/py_huya.json new file mode 100644 index 0000000..8f387f3 --- /dev/null +++ b/py/plugin/py_huya.json @@ -0,0 +1,185 @@ +#coding=utf-8 +#!/usr/bin/python +import sys +sys.path.append('..') +from base.spider import Spider +import json +import re +import time +import html +import base64 +import hashlib +import urllib.parse + +class Spider(Spider): + def getName(self): + return "虎牙" + def init(self,extend=""): + pass + def isVideoFormat(self,url): + pass + def manualVideoCheck(self): + pass + def homeContent(self,filter): + result = {} + cateManual = { +"音乐":"音乐", +"星秀":"星秀", +"颜值":"颜值", +"交友":"交友", +"户外":"户外", +"美食":"美食", +"一起看":"一起看", +"王者荣耀":"王者荣耀", +"和平精英":"和平精英", +"英雄联盟":"英雄联盟", +"天天吃鸡":"天天吃鸡", +"穿越火线":"穿越火线", +"二次元":"二次元", +"体育":"体育", +"原神":"原神", +"三国杀":"三国杀", +"暗黑破坏神:不朽":"暗黑破坏神:不朽", +"迷你世界":"迷你世界", +"暗区突围":"暗区突围", +"生死狙击2":"生死狙击2", +"金铲铲之战":"金铲铲之战", +"英雄联盟手游":"英雄联盟手游", +"lol云顶之弈":"lol云顶之弈", +"剑侠世界3":"剑侠世界3", +"不良人3":"不良人3", +"二次元":"二次元", + "主机游戏":"主机游戏" + } + classes = [] + for k in cateManual: + classes.append({ + 'type_name': k, + 'type_id': cateManual[k] + }) + + result['class'] = classes + if (filter): + result['filters'] = self.config['filter'] + return result + def homeVideoContent(self): + result = {} + return result + def categoryContent(self,tid,pg,filter,extend): + result = {} + url = 'http://live.yj1211.work/api/live/getRecommendByPlatformArea?platform=huya&size=20&area={0}&page={1}'.format(tid, pg) + rsp = self.fetch(url) + content = rsp.text + jo = json.loads(content) + videos = [] + vodList = jo['data'] + for vod in vodList: + aid = (vod['roomId']).strip() + title = vod['roomName'].strip() + img = vod['roomPic'].strip() + remark = (vod['ownerName']).strip() + videos.append({ + "vod_id": aid, + "vod_name": title, + "vod_pic": img, + "vod_remarks": remark + }) + result['list'] = videos + result['page'] = pg + result['pagecount'] = 9999 + result['limit'] = 90 + result['total'] = 999999 + return result + def detailContent(self,array): + aid = array[0] + url = 'https://www.huya.com/' + aid + header = { + 'Content-Type': 'application/x-www-form-urlencoded', + 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36' + } + rsp = self.fetch(url, headers=header) + streamInfo = re.findall(r'stream: ([\s\S]*?)\n', rsp.text) + if (len(streamInfo) > 0): + liveData = json.loads(streamInfo[0]) + else: + streamInfo = re.findall(r'"stream": "([\s\S]*?)"', rsp.text) + if (len(streamInfo) > 0): + liveDataBase64 = streamInfo[0] + liveData = json.loads(str(base64.b64decode(liveDataBase64), 'utf-8')) + streamInfoList = liveData['data'][0]['gameStreamInfoList'] + vod = { + "vod_id": aid, + "vod_name": liveData['data'][0]['gameLiveInfo']['roomName'], + "vod_pic": liveData['data'][0]['gameLiveInfo']['screenshot'], + "type_name": liveData['data'][0]['gameLiveInfo']['gameFullName'], + "vod_year": "", + "vod_area": "", + "vod_remarks": "", + "vod_actor": "", + "vod_director": "", + "vod_content": "" + } + playUrl = '' + for streamInfo in streamInfoList: + hls_url = streamInfo['sHlsUrl'] + '/' + streamInfo['sStreamName'] + '.' + streamInfo['sHlsUrlSuffix'] + srcAntiCode = html.unescape(streamInfo['sHlsAntiCode']) + c = srcAntiCode.split('&') + c = [i for i in c if i != ''] + n = {i.split('=')[0]: i.split('=')[1] for i in c} + fm = urllib.parse.unquote(n['fm']) + u = base64.b64decode(fm).decode('utf-8') + hash_prefix = u.split('_')[0] + ctype = n.get('ctype', '') + txyp = n.get('txyp', '') + fs = n.get('fs', '') + t = n.get('t', '') + seqid = str(int(time.time() * 1e3 + 1463993859134)) + wsTime = hex(int(time.time()) + 3600).replace('0x', '') + hash = hashlib.md5('_'.join([hash_prefix, '1463993859134', streamInfo['sStreamName'], hashlib.md5((seqid + '|' + ctype + '|' + t).encode('utf-8')).hexdigest(), wsTime]).encode('utf-8')).hexdigest() + ratio = '' + purl = "{}?wsSecret={}&wsTime={}&seqid={}&ctype={}&ver=1&txyp={}&fs={}&ratio={}&u={}&t={}&sv=2107230339".format( hls_url, hash, wsTime, seqid, ctype, txyp, fs, ratio, '1463993859134', t) + playUrl = playUrl + '{}${}#'.format(streamInfo['sCdnType'], purl) + vod['vod_play_from'] = '虎牙直播' + vod['vod_play_url'] = playUrl + + result = { + 'list': [ + vod + ] + } + return result + def searchContent(self,key,quick): + result = {} + return result + def playerContent(self,flag,id,vipFlags): + result = {} + url = id + result["parse"] = 0 + result["playUrl"] = '' + result["url"] = url + result["header"] = { + "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" + } + result["contentType"] = '' + return result + + config = { + "player": {}, + "filter": {} + } + header = {} + + config = { + "player": {}, + "filter": {} + } + header = {} + def localProxy(self,param): + action = { + 'url':'', + 'header':'', + 'param':'', + 'type':'string', + 'after':'' + } + return [200, "video/MP2T", action, ""] \ No newline at end of file diff --git a/py/plugin/py_if101.json b/py/plugin/py_if101.json new file mode 100644 index 0000000..8b365b3 --- /dev/null +++ b/py/plugin/py_if101.json @@ -0,0 +1,86 @@ +#coding=utf-8 +#!/usr/bin/python +import sys +sys.path.append('..') +from base.spider import Spider +import json +import urllib.parse + +class Spider(Spider): + def getName(self): + return "IF101影视" + def init(self,extend=""): + print("============{0}============".format(extend)) + pass + def homeContent(self,filter): + result = {} + + classes = [{"type_id":20,"type_name":"电影"},{"type_id":21,"type_name":"电视剧"},{"type_id":22,"type_name":"动漫"},{"type_id":23,"type_name":"综艺"},{"type_id":24,"type_name":"体育"},{"type_id":25,"type_name":"纪录片"},{"type_id":26,"type_name":"明星资讯"},{"type_id":28,"type_name":"冒险片"},{"type_id":29,"type_name":"剧情片"},{"type_id":30,"type_name":"动作片"},{"type_id":31,"type_name":"动画电影"},{"type_id":32,"type_name":"同性片"},{"type_id":33,"type_name":"喜剧片"},{"type_id":34,"type_name":"奇幻片"},{"type_id":35,"type_name":"恐怖片"},{"type_id":36,"type_name":"悬疑片"},{"type_id":37,"type_name":"惊悚片"},{"type_id":38,"type_name":"歌舞片"},{"type_id":39,"type_name":"灾难片"},{"type_id":40,"type_name":"爱情片"},{"type_id":41,"type_name":"犯罪片"},{"type_id":42,"type_name":"科幻片"},{"type_id":43,"type_name":"经典片"},{"type_id":44,"type_name":"网络电影"},{"type_id":117,"type_name":"战争片"},{"type_id":119,"type_name":"欧美剧"},{"type_id":120,"type_name":"日剧"},{"type_id":121,"type_name":"韩剧"},{"type_id":122,"type_name":"国产剧"},{"type_id":123,"type_name":"泰剧"},{"type_id":124,"type_name":"港剧"},{"type_id":125,"type_name":"台剧"},{"type_id":126,"type_name":"新马剧"},{"type_id":127,"type_name":"其他剧"},{"type_id":128,"type_name":"欧美综艺"},{"type_id":129,"type_name":"日本综艺"},{"type_id":130,"type_name":"韩国综艺"},{"type_id":131,"type_name":"国产综艺"},{"type_id":132,"type_name":"新马泰综艺"},{"type_id":133,"type_name":"港台综艺"},{"type_id":134,"type_name":"其他综艺"},{"type_id":135,"type_name":"欧美动漫"},{"type_id":136,"type_name":"日本动漫"},{"type_id":137,"type_name":"韩国动漫"},{"type_id":138,"type_name":"国产动漫"},{"type_id":139,"type_name":"新马泰动漫"},{"type_id":140,"type_name":"港台动漫"},{"type_id":142,"type_name":"其他动漫"}] + + result['class'] = classes + return result + def homeVideoContent(self): + rsp = self.fetch("https://api.8a5.cn/parse/if101/py.php?do=homeVideoContent") + alists = json.loads(rsp.text) + alist = alists['list'] + result = { + 'list':alist + } + return result + def categoryContent(self,tid,pg,filter,extend): + result = {} + urlParams = [] + params = '' + for key in extend: + urlParams.append(str(key) + '=' + extend[key]) + params = '&'.join(urlParams) + url = 'https://api.8a5.cn/parse/if101/py.php?do=categoryContent&tid={0}&page={1}&{2}'.format(tid, pg,params) + rsp = self.fetch(url) + alists = json.loads(rsp.text) + alist = alists['list'] + + result['list'] = alist + result['page'] = pg + result['pagecount'] = 9999 + result['limit'] = 90 + result['total'] = 999999 + return result + + def detailContent(self,array): + tid = array[0] + url = 'https://api.8a5.cn/parse/if101/py.php?do=detailContent&id={0}'.format(tid) + rsp = self.fetch(url) + alists = json.loads(rsp.text) + vod = alists['vod'] + result = { + 'list':[ + vod + ] + } + return result + + def searchContent(self,key,quick): + url = 'https://api.8a5.cn/parse/if101/py.php?do=searchContent&wd={0}'.format(key) + rsp = self.fetch(url) + alists = json.loads(rsp.text) + list = alists['list'] + result = { + 'list':list + } + return result + + + def playerContent(self,flag,id,vipFlags): + result = {} + id = 'https://api.8a5.cn/parse/if101/get.php?url=' + urllib.parse.quote(id) + result["parse"] = 0 + result["playUrl"] = '' + result["url"] = id + return result + + def isVideoFormat(self,url): + pass + def manualVideoCheck(self): + pass + def localProxy(self,param): + return [200, "video/MP2T", action, ""] diff --git a/py/plugin/py_jrskbs.json b/py/plugin/py_jrskbs.json new file mode 100644 index 0000000..d6e91ba --- /dev/null +++ b/py/plugin/py_jrskbs.json @@ -0,0 +1,166 @@ +#coding=utf-8 +#!/usr/bin/python +import sys +sys.path.append('..') +from base.spider import Spider +import re +import math + +class Spider(Spider): + def getName(self): + return "体育直播" + def init(self,extend=""): + pass + def isVideoFormat(self,url): + pass + def manualVideoCheck(self): + pass + def homeContent(self,filter): + result = {} + cateManual = { + "全部": "" + } + classes = [] + for k in cateManual: + classes.append({ + 'type_name': k, + 'type_id': cateManual[k] + }) + + result['class'] = classes + if (filter): + result['filters'] = self.config['filter'] + return result + def homeVideoContent(self): + result = {} + return result + + def categoryContent(self,tid,pg,filter,extend): + result = {} + url = 'https://m.jrskbs.com' + rsp = self.fetch(url) + html = self.html(rsp.text) + aList = html.xpath("//div[contains(@class, 'contentList')]/a") + videos = [] + numvL = len(aList) + pgc = math.ceil(numvL/15) + for a in aList: + aid = a.xpath("./@href")[0] + aid = self.regStr(reg=r'/live/(.*?).html', src=aid) + img = a.xpath(".//div[@class='contentLeft']/p/img/@src")[0] + home = a.xpath(".//div[@class='contentLeft']/p[@class='false false']/text()")[0] + away = a.xpath(".//div[@class='contentRight']/p[@class='false false']/text()")[0] + infoArray = a.xpath(".//div[@class='contentCenter']/p") + remark = '' + for info in infoArray: + content = info.xpath('string(.)').replace(' ','') + remark = remark + '|' + content + videos.append({ + "vod_id": aid, + "vod_name": home + 'vs' + away, + "vod_pic": img, + "vod_remarks": remark.strip('|') + }) + result['list'] = videos + result['page'] = pg + result['pagecount'] = pgc + result['limit'] = numvL + result['total'] = numvL + return result + + def detailContent(self,array): + aid = array[0] + url = "http://m.jrskbs.com/live/{0}.html".format(aid) + rsp = self.fetch(url) + root = self.html(rsp.text) + divContent = root.xpath("//div[@class='today']")[0] + home = divContent.xpath(".//p[@class='onePlayer homeTeam']/text()")[0] + away = divContent.xpath(".//div[3]/text()")[0].strip() + title = home + 'vs' + away + pic = divContent.xpath(".//img[@class='gameLogo1 homeTeam_img']/@src")[0] + typeName = divContent.xpath(".//div/p[@class='name1 matchTime_wap']/text()")[0] + remark = divContent.xpath(".//div/p[@class='time1 matchTitle']/text()")[0].replace(' ','') + vod = { + "vod_id": aid, + "vod_name": title, + "vod_pic": pic, + "type_name": typeName, + "vod_year": "", + "vod_area": "", + "vod_remarks": remark, + "vod_actor": '', + "vod_director":'', + "vod_content": '' + } + urlList = root.xpath("//div[@class='liveshow']/a") + playUrl = '' + for url in urlList: + name = url.xpath("./text()")[0] + purl = url.xpath("./@data-url")[0] + playUrl =playUrl + '{0}${1}#'.format(name, purl) + vod['vod_play_from'] = '体育直播' + vod['vod_play_url'] = playUrl + + result = { + 'list': [ + vod + ] + } + return result + + def searchContent(self,key,quick): + result = {} + return result + + def playerContent(self,flag,id,vipFlags): + result = {} + url = id + if '04stream' in url: + rsp = self.fetch(url) + html = rsp.text + strList = re.findall(r"eval\((.*?)\);", html) + fuctList = strList[1].split('+') + scrpit = '' + for fuc in fuctList: + if fuc.endswith(')'): + append = fuc.split(')')[-1] + else: + append = '' + Unicode = int(self.regStr(reg=r'l\((.*?)\)', src=fuc)) + char = chr(Unicode % 256) + char = char + append + scrpit = scrpit + char + par = self.regStr(reg=r'/(.*)/', src=scrpit).replace(')', '') + pars = par.split('/') + infoList = strList[2].split('+') + str = '' + for info in infoList: + if info.startswith('O'): + Unicode = int(int(self.regStr(reg=r'O\((.*?)\)', src=info)) / int(pars[0]) / int(pars[1])) + char = chr(Unicode % 256) + str = str + char + url = self.regStr(reg=r"play_url=\'(.*?)\'", src=str) + result["parse"] = 0 + else: + url = id + result["parse"] = 1 + result["playUrl"] = '' + result["url"] = url + result["header"] = '' + return result + + config = { + "player": {}, + "filter": {} + } + header = {} + + def localProxy(self,param): + action = { + 'url':'', + 'header':'', + 'param':'', + 'type':'string', + 'after':'' + } + return [200, "video/MP2T", action, ""] \ No newline at end of file diff --git a/py/plugin/py_koudaiys.json b/py/plugin/py_koudaiys.json new file mode 100644 index 0000000..cabaca0 --- /dev/null +++ b/py/plugin/py_koudaiys.json @@ -0,0 +1,249 @@ +# coding=utf-8 +# !/usr/bin/python +import sys + +sys.path.append('..') +from base.spider import Spider +import json +import time +import base64 + + +class Spider(Spider): # 元类 默认的元类 type + def getName(self): + return "口袋影视" + + def init(self, extend=""): + print("============{0}============".format(extend)) + pass + + def isVideoFormat(self, url): + pass + + def manualVideoCheck(self): + pass + + def homeContent(self, filter): + # http://www.koudaitv.com/ + result = {} + cateManual = { + "电影": "1", + "连续剧": "2", + "动漫": "4", + "综艺": "3", + "韩剧": "14", + "美剧": "15" + } + classes = [] + for k in cateManual: + classes.append({ + 'type_name': k, + 'type_id': cateManual[k] + }) + result['class'] = classes + if (filter): + result['filters'] = self.config['filter'] + return result + + def homeVideoContent(self): + rsp = self.fetch("http://www.koudaitv.com/", headers=self.header) + root = self.html(rsp.text) + vodList = root.xpath("//div[@class='tbox2']/ul[@class='tbox_m2']/li[@class='vbox']/a") + + videos = [] + for vod in vodList: + name = vod.xpath("./@title")[0] + pic = vod.xpath("./@data-original")[0] + mark = vod.xpath(".//span/text()")[0] + sid = vod.xpath("./@href")[0] + sid = self.regStr(sid, "/detail/(\\S+).html") + videos.append({ + "vod_id": sid, + "vod_name": name, + "vod_pic": pic, + "vod_remarks": mark + }) + result = { + 'list': videos + } + return result + + def categoryContent(self, tid, pg, filter, extend): + result = {} + if 'id' not in extend.keys(): + extend['id'] = tid + extend['page'] = pg + filterParams = ["id", "area", "by", "class", "", "", "", "", "page", "", "", "year"] + params = ["", "", "", "", "", "", "", "", "", "", "", ""] + for idx in range(len(filterParams)): + fp = filterParams[idx] + if fp in extend.keys(): + params[idx] = extend[fp] + suffix = '-'.join(params) + url = 'http://www.koudaitv.com/type/{0}.html'.format(suffix) + + rsp = self.fetch(url, headers=self.header) + root = self.html(rsp.text) + vodList = root.xpath("//div[@class='tbox2']/ul[@class='tbox_m2']/li[@class='vbox']/a") + videos = [] + for vod in vodList: + name = vod.xpath("./@title")[0] + pic = vod.xpath("./@data-original")[0] + mark = vod.xpath(".//span/text()")[0] + sid = vod.xpath("./@href")[0] + sid = self.regStr(sid, "/detail/(\\S+).html") + videos.append({ + "vod_id": sid, + "vod_name": name, + "vod_pic": pic, + "vod_remarks": mark + }) + result['list'] = videos + result['page'] = pg + result['pagecount'] = 9999 + result['limit'] = 90 + result['total'] = 999999 + return result + + def detailContent(self, array): + tid = array[0] + url = 'http://www.koudaitv.com/detail/{0}.html'.format(tid) + rsp = self.fetch(url, headers=self.header) + root = self.html(rsp.text) + node = root.xpath("//div[@class='data']")[0] + title = node.xpath(".//h4/text()")[0] + pic = root.xpath(".//div[@class='img item-lazy']/@data-original")[0] + vod = { + "vod_id": tid, + "vod_name": title, + "vod_pic": pic, + "type_name": "", + "vod_year": "", + "vod_area": "", + "vod_remarks": "", + "vod_actor": "", + "vod_director": "", + "vod_content": "" + } + infoArray = node.xpath(".//div[@class='list_block show']") + for info in infoArray: + content = info.xpath('string(.)') + # if content.startswith('分類'): + # vod['type_name'] = content + # if content.startswith('年份'): + # vod['vod_year'] = content + # if content.startswith('地区'): + # vod['vod_area'] = content + #if content.startswith('片长'): + # vod['vod_remarks'] = content.replace('\n', '').replace('\t', '') + if content.startswith('主演'): + vod['vod_actor'] = content.replace('\n', '').replace('\t', '') + if content.startswith('导演'): + vod['vod_director'] = content.replace('\n', '').replace('\t', '') + # if content.startswith('剧情'): + # vod['vod_content'] = content.replace('\n','').replace('\t','') + vod['vod_content'] = root.xpath(".//div[@class='tbox_js']/text()")[0] + vod_play_from = '$$$' + playFrom = [] + vodHeader = root.xpath(".//div[@class='tbox2 tabs']/div/h3/text()") + + for v in vodHeader: + playFrom.append(v.strip()) + vod_play_from = vod_play_from.join(playFrom) + + vod_play_url = '$$$' + playList = [] + vodList = root.xpath(".//div[@class='tbox2 tabs']/div[@class='tabs_block2']/ul/li") + + for vl in vodList: + vodItems = [] + aList = vl.xpath('./a') + for tA in aList: + href = tA.xpath('./@href')[0] + name = tA.xpath('.//text()')[0] + tId = self.regStr(href, '/play/(\\S+).html') + vodItems.append(name + "$" + tId) + joinStr = '#' + joinStr = joinStr.join(vodItems) + playList.append(joinStr) + vod_play_url = vod_play_url.join(playList) + + vod['vod_play_from'] = vod_play_from + vod['vod_play_url'] = vod_play_url + + result = { + 'list': [ + vod + ] + } + return result + + def searchContent(self, key, quick): + url = "http://www.koudaitv.com/index.php/ajax/suggest?mid=1&wd={0}".format(key) + rsp = self.fetch(url, headers=self.header) + jo = json.loads(rsp.text) + vodList = jo['list'] + videos = [] + for vod in vodList: + name = vod['name'] + pic = vod['pic'] + mark = '' + sid = vod['id'] + videos.append({ + "vod_id": sid, + "vod_name": name, + "vod_pic": pic, + "vod_remarks": mark + }) + result = { + 'list': videos + } + return result + + def playerContent(self, flag, id, vipFlags): + # https://meijuchong.cc/static/js/playerconfig.js + result = {} + url = 'http://www.koudaitv.com/play/{0}.html'.format(id) + rsp = self.fetch(url, headers=self.header) + root = self.html(rsp.text) + scripts = root.xpath("//script/text()") + jo = {} + for script in scripts: + if (script.startswith("var player_")): + target = script[script.index('{'):] + jo = json.loads(target) + break; + + parseUrl = 'https://play.shtpin.com/xplay/?url={0}'.format(jo['url']) + parseRsp = self.fetch(parseUrl, headers={'referer': 'http://www.koudaitv.com/'}) + + configStr = self.regStr(parseRsp.text, 'var config = ({[\\s\\S]+})') + configJo = json.loads(configStr) + playUrl = 'https://play.shtpin.com/xplay/555tZ4pvzHE3BpiO838.php?tm={0}&url={1}&vkey={2}&token={3}&sign=F4penExTGogdt6U8' + playUrl.format(time.time(), configJo['url'], configJo['vkey'], configJo['token']) + playRsp = self.fetch(playUrl.format(time.time(), configJo['url'], configJo['vkey'], configJo['token']) + , headers={'referer': 'http://www.koudaitv.com/'}) + playJo = json.loads(playRsp.text) + b64 = playJo['url'][8:] + targetUrl = base64.b64decode(b64)[8:-8].decode() + + result["parse"] = 0 + result["playUrl"] = '' + result["url"] = targetUrl + result["header"] = '' + return result + + config = { + "player": {}, + "filter": {"1":[{"key":"id","name":"类型","value":[{"n":"全部","v":"1"},{"n":"动作","v":"6"},{"n":"喜剧","v":"7"},{"n":"爱情","v":"8"},{"n":"科幻","v":"9"},{"n":"恐怖","v":"10"},{"n":"剧情","v":"11"},{"n":"战争","v":"12"},{"n":"动画","v":"23"}]},{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"喜剧","v":"喜剧"},{"n":"爱情","v":"爱情"},{"n":"恐怖","v":"恐怖"},{"n":"动作","v":"动作"},{"n":"科幻","v":"科幻"},{"n":"剧情","v":"剧情"},{"n":"战争","v":"战争"},{"n":"警匪","v":"警匪"},{"n":"犯罪","v":"犯罪"},{"n":"动画","v":"动画"},{"n":"奇幻","v":"奇幻"},{"n":"武侠","v":"武侠"},{"n":"冒险","v":"冒险"},{"n":"枪战","v":"枪战"},{"n":"恐怖","v":"恐怖"},{"n":"悬疑","v":"悬疑"},{"n":"惊悚","v":"惊悚"},{"n":"经典","v":"经典"},{"n":"青春","v":"青春"},{"n":"文艺","v":"文艺"},{"n":"微电影","v":"微电影"},{"n":"古装","v":"古装"},{"n":"历史","v":"历史"},{"n":"运动","v":"运动"},{"n":"农村","v":"农村"},{"n":"儿童","v":"儿童"},{"n":"网络电影","v":"网络电影"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"中国大陆","v":"中国大陆"},{"n":"中国香港","v":"中国香港"},{"n":"中国台湾","v":"中国台湾"},{"n":"美国","v":"美国"},{"n":"法国","v":"法国"},{"n":"英国","v":"英国"},{"n":"日本","v":"日本"},{"n":"韩国","v":"韩国"},{"n":"德国","v":"德国"},{"n":"泰国","v":"泰国"},{"n":"印度","v":"印度"},{"n":"意大利","v":"意大利"},{"n":"西班牙","v":"西班牙"},{"n":"加拿大","v":"加拿大"},{"n":"其他","v":"其他"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"}]},{"key":"by","name":"排序","value":[{"n":"最新","v":"time"},{"n":"最热","v":"hits"},{"n":"评分","v":"score"}]}], + "2":[{"key":"id","name":"类型","value":[{"n":"全部","v":"2"},{"n":"国产剧","v":"13"},{"n":"港台剧","v":"14"},{"n":"日韩剧","v":"15"},{"n":"欧美剧","v":"16"},{"n":"纪 录片","v":"21"},{"n":"泰国剧","v":"24"}]},{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"古装","v":"古装"},{"n":"战争","v":"战争"},{"n":"青春偶像","v":"青春偶像"},{"n":"喜剧","v":"喜剧"},{"n":"家庭","v":"家庭"},{"n":"犯罪","v":"犯罪"},{"n":"动作","v":"动作"},{"n":"奇幻","v":"奇幻"},{"n":"剧情","v":"剧情"},{"n":"历史","v":"历史"},{"n":"经典","v":"经典"},{"n":"乡村","v":"乡村"},{"n":"情景","v":"情景"},{"n":"商战","v":"商战"},{"n":"网剧","v":"网剧"},{"n":"其他","v":"其他"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"中国大陆","v":"中国大陆"},{"n":"中国台湾","v":"中国台湾"},{"n":"中国香港","v":"中国香港"},{"n":"韩国","v":"韩国"},{"n":"日本","v":"日本"},{"n":"美国","v":"美国"},{"n":"泰国","v":"泰国"},{"n":"英国","v":"英国"},{"n":"新加坡","v":"新加坡"},{"n":"其他","v":"其他"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"}]},{"key":"by","name":"排序","value":[{"n":"最新","v":"time"},{"n":"最热","v":"hits"},{"n":"评分","v":"score"}]}], + "4":[{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"情感","v":"情感"},{"n":"科幻","v":"科幻"},{"n":"热血","v":"热血"},{"n":"推理","v":"推理"},{"n":"搞笑","v":"搞笑"},{"n":"冒险","v":" 冒险"},{"n":"萝莉","v":"萝莉"},{"n":"校园","v":"校园"},{"n":"动作","v":"动作"},{"n":"机战","v":"机战"},{"n":"运动","v":"运动"},{"n":"战争","v":"战争"},{"n":"少年","v":"少年"},{"n":"少女","v":"少女"},{"n":" 社会","v":"社会"},{"n":"原创","v":"原创"},{"n":"亲子","v":"亲子"},{"n":"益智","v":"益智"},{"n":"励志","v":"励志"},{"n":"其他","v":"其他"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"中国","v":"中国"},{"n":"日本","v":"日本"},{"n":"欧美","v":"欧美"},{"n":"其他","v":"其他"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"}]},{"key":"by","name":"排序","value":[{"n":"最新","v":"time"},{"n":"最热","v":"hits"},{"n":"评分","v":"score"}]}], + "3":[{"key":"class","name":"剧情","value":[{"n":"全部","v":""},{"n":"选秀","v":"选秀"},{"n":"情感","v":"情感"},{"n":"访谈","v":"访谈"},{"n":"播报","v":"播报"},{"n":"旅游","v":"旅游"},{"n":"音乐","v":"音乐"},{"n":"美食","v":"美食"},{"n":"纪实","v":"纪实"},{"n":"曲艺","v":"曲艺"},{"n":"生活","v":"生活"},{"n":"游戏互动","v":"游戏互动"},{"n":"财经","v":"财经"},{"n":"求职","v":"求职"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":""},{"n":"内地","v":"内地"},{"n":"港台","v":"港台"},{"n":"日韩","v":"日韩"},{"n":"欧美","v":"欧美"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":""},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"2008","v":"2008"},{"n":"2007","v":"2007"},{"n":"2006","v":"2006"},{"n":"2005","v":"2005"},{"n":"2004","v":"2004"}]},{"key":"by","name":"排序","value":[{"n":"最新","v":"time"},{"n":"最热","v":"hits"},{"n":"评分","v":"score"}]}]} + } + + header = { + "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + } + + def localProxy(self, param): + return [200, "video/MP2T", action, ""] diff --git a/py/plugin/py_kuaikan.json b/py/plugin/py_kuaikan.json new file mode 100644 index 0000000..c6c4287 --- /dev/null +++ b/py/plugin/py_kuaikan.json @@ -0,0 +1,105 @@ +#coding=utf-8 +#!/usr/bin/python +import sys +sys.path.append('..') +from base.spider import Spider +import json + +class Spider(Spider): # 元类 默认的元类 type + def getName(self): + return "快看影视" + def init(self,extend=""): + print("============{0}============".format(extend)) + pass + def homeContent(self,filter): + result = {} + cateManual = { + "电视剧":"2", + "电影":"1", + "综艺":"3", + "动漫":"4", + "纪录片": "5" + } + classes = [] + for k in cateManual: + classes.append({ + 'type_name':k, + 'type_id':cateManual[k] + }) + + result['class'] = classes + if(filter): + result['filters'] = self.config['filter'] + return result + def homeVideoContent(self): + rsp = self.fetch("http://api.8a5.cn/parse/kuaikan/py.php?do=homeVideoContent") + alists = json.loads(rsp.text) + alist = alists['list'] + result = { + 'list':alist + } + return result + def categoryContent(self,tid,pg,filter,extend): + result = {} + urlParams = [] + params = '' + for key in extend: + urlParams.append(str(key) + '=' + extend[key]) + params = '&'.join(urlParams) + url = 'http://api.8a5.cn/parse/kuaikan/py.php?do=categoryContent&tid={0}&page={1}&{2}'.format(tid, pg,params) + rsp = self.fetch(url) + alists = json.loads(rsp.text) + alist = alists['list'] + + result['list'] = alist + result['page'] = pg + result['pagecount'] = 9999 + result['limit'] = 90 + result['total'] = 999999 + return result + + def detailContent(self,array): + tid = array[0] + url = 'http://api.8a5.cn/parse/kuaikan/py.php?do=detailContent&id={0}'.format(tid) + rsp = self.fetch(url) + alists = json.loads(rsp.text) + vod = alists['vod'] + result = { + 'list':[ + vod + ] + } + return result + + def searchContent(self,key,quick): + url = 'http://api.8a5.cn/parse/kuaikan/py.php?do=searchContent&wd={0}'.format(key) + rsp = self.fetch(url) + alists = json.loads(rsp.text) + list = alists['list'] + result = { + 'list':list + } + return result + + + def playerContent(self,flag,id,vipFlags): + result = {} + if 'api.8a5.cn' in id: + rsp = self.fetch(id) + alists = json.loads(rsp.text) + id = alists['url'] + result["parse"] = 0 + result["playUrl"] = '' + result["url"] = id + return result + + config = { + "player": {}, + "filter":{"2":[{"key":"area","name":"地区","value":[{"n":"全部","v":0},{"n":"内地","v":1},{"n":"中国香港","v":2},{"n":"中国台湾","v":3},{"n":"韩国","v":4},{"n":"日本","v":5},{"n":"泰国","v":6},{"n":"美国","v":7},{"n":"英国","v":8},{"n":"新加坡","v":9},{"n":"法国","v":10},{"n":"德国","v":11},{"n":"印度","v":12},{"n":"欧美","v":13},{"n":"其他","v":14}]},{"key":"year","name":"年份","value":[{"n":"全部","v":0},{"n":"2022","v":20},{"n":"2021","v":19},{"n":"2020","v":18},{"n":"2019","v":17},{"n":"2018","v":16},{"n":"2017","v":15},{"n":"2016","v":14},{"n":"2015","v":13},{"n":"2014","v":12},{"n":"2013","v":11},{"n":"2012","v":10},{"n":"2011","v":9},{"n":"2010","v":8},{"n":"2009","v":7},{"n":"2008","v":6},{"n":"2007","v":5},{"n":"2006","v":4},{"n":"2005","v":3},{"n":"2004","v":2},{"n":"更早","v":1}]},{"key":"class","name":"剧情","value":[{"n":"全部","v":0},{"n":"剧情","v":2},{"n":"爱情","v":21},{"n":"犯罪","v":23},{"n":"搞笑","v":34},{"n":"武侠","v":19},{"n":"都市","v":6},{"n":"家庭","v":16},{"n":"职场","v":42},{"n":"国产","v":112},{"n":"国产剧","v":113},{"n":"年代","v":110},{"n":"文化","v":84},{"n":"网络剧","v":114},{"n":"芒果出品","v":115},{"n":"言情","v":1},{"n":"古装","v":8},{"n":"青春","v":15},{"n":"偶像","v":7},{"n":"伦理","v":3},{"n":"喜剧","v":4},{"n":"悬疑","v":5},{"n":"神话","v":13},{"n":"警匪","v":10},{"n":"历史","v":11},{"n":"励志","v":12},{"n":"情感","v":38},{"n":"战争","v":25},{"n":"电影版","v":74},{"n":"其他","v":79},{"n":"谍战","v":14},{"n":"校园","v":61},{"n":"农村","v":88},{"n":"动作","v":17},{"n":"传记","v":29},{"n":"科幻","v":20},{"n":"惊悚","v":31},{"n":"冒险","v":56},{"n":"同性","v":111},{"n":"恋爱","v":58},{"n":"奇幻","v":24},{"n":"生活","v":39},{"n":"歌舞","v":30},{"n":"恐怖","v":22},{"n":"原创","v":86},{"n":"魔幻","v":85},{"n":"战斗","v":80},{"n":"军旅","v":104},{"n":"文艺","v":27},{"n":"音乐","v":41},{"n":"新番动画","v":77},{"n":"刑侦","v":87},{"n":"情景","v":18},{"n":"玄幻","v":60},{"n":"军事","v":9},{"n":"经典","v":55},{"n":"推理","v":57},{"n":"革命","v":109},{"n":"纪录","v":28},{"n":"运动","v":66},{"n":"热血","v":53},{"n":"竞技","v":70},{"n":"童话","v":69},{"n":"友情","v":72},{"n":"少儿","v":46},{"n":"真人秀","v":33},{"n":"动画","v":26},{"n":"灾难","v":103},{"n":"纪实","v":48},{"n":"机战","v":63},{"n":"治愈","v":59},{"n":"时尚","v":44},{"n":"脱口秀","v":32},{"n":"美食","v":43},{"n":"戏曲","v":108},{"n":"人文","v":83},{"n":"完结动画","v":78},{"n":"社会","v":71},{"n":"益智","v":68},{"n":"亲子","v":64},{"n":"访谈","v":37},{"n":"游戏","v":45},{"n":"晚会","v":40},{"n":"美少女","v":54},{"n":"动物","v":62},{"n":"真人版","v":73},{"n":"科学","v":92},{"n":"内地","v":117}]}],"1":[{"key":"area","name":"地区","value":[{"n":"全部","v":0},{"n":"中国","v":1},{"n":"中国香港","v":2},{"n":"中国台湾","v":3},{"n":"韩国","v":4},{"n":"日本","v":5},{"n":"泰国","v":6},{"n":"美国","v":7},{"n":"英国","v":8},{"n":"新加坡","v":9},{"n":"法国","v":10},{"n":"德国","v":11},{"n":"印度","v":12},{"n":"欧美","v":13},{"n":"其他","v":14}]},{"key":"year","name":"年份","value":[{"n":"全部","v":0},{"n":"2022","v":20},{"n":"2021","v":19},{"n":"2020","v":18},{"n":"2019","v":17},{"n":"2018","v":16},{"n":"2017","v":15},{"n":"2016","v":14},{"n":"2015","v":13},{"n":"2014","v":12},{"n":"2013","v":11},{"n":"2012","v":10},{"n":"2011","v":9},{"n":"2010","v":8},{"n":"2009","v":7},{"n":"2008","v":6},{"n":"2007","v":5},{"n":"2006","v":4},{"n":"2005","v":3},{"n":"2004","v":2},{"n":"更早","v":1}]},{"key":"class","name":"剧情","value":[{"n":"全部","v":0},{"n":"言情","v":1},{"n":"动作","v":17},{"n":"惊悚","v":31},{"n":"剧情","v":2},{"n":"科幻","v":20},{"n":"喜剧","v":4},{"n":"冒险","v":56},{"n":"动画","v":26},{"n":"悬疑","v":5},{"n":"恐怖","v":22},{"n":"文艺","v":27},{"n":"纪实","v":48},{"n":"爱情","v":21},{"n":"历史","v":11},{"n":"犯罪","v":23},{"n":"战争","v":25},{"n":"青春","v":15},{"n":"家庭","v":16},{"n":"传记","v":29},{"n":"奇幻","v":24},{"n":"电影版","v":74},{"n":"古装","v":8},{"n":"纪录","v":28},{"n":"恋爱","v":58},{"n":"伦理","v":3},{"n":"歌舞","v":30},{"n":"音乐","v":41},{"n":"推理","v":57},{"n":"武侠","v":19},{"n":"警匪","v":10},{"n":"科普","v":102},{"n":"灾难","v":103},{"n":"军旅","v":104},{"n":"戏曲","v":108},{"n":"革命","v":109},{"n":"文化","v":84},{"n":"运动","v":66},{"n":"社会","v":71},{"n":"年代","v":110},{"n":"同性","v":111},{"n":"励志","v":12},{"n":"热血","v":53},{"n":"教育","v":90},{"n":"神话","v":13},{"n":"谍战","v":14},{"n":"搞笑","v":34},{"n":"情感","v":38},{"n":"治愈","v":59},{"n":"校园","v":61},{"n":"枪战","v":98},{"n":"玄幻","v":60},{"n":"魔幻","v":85},{"n":"友情","v":72},{"n":"少儿","v":46},{"n":"体育","v":47},{"n":"经典","v":55},{"n":"军事","v":9},{"n":"脱口秀","v":32},{"n":"刑侦","v":87},{"n":"农村","v":88},{"n":"美食","v":43},{"n":"竞技","v":70},{"n":"都市","v":6},{"n":"其他","v":79},{"n":"真人版","v":73},{"n":"战斗","v":80},{"n":"完结动画","v":78},{"n":"美少女","v":54},{"n":"亲子","v":64},{"n":"生活","v":39},{"n":"时尚","v":44},{"n":"美术","v":49},{"n":"动物","v":62},{"n":"自然","v":89},{"n":"旅游","v":82},{"n":"人文","v":83},{"n":"真人秀","v":33},{"n":"访谈","v":37},{"n":"晚会","v":40},{"n":"职场","v":42},{"n":"财经","v":50},{"n":"偶像","v":7},{"n":"科学","v":92},{"n":"解说","v":93},{"n":"新闻","v":96},{"n":"内地","v":117},{"n":"明星","v":116},{"n":"国产","v":112},{"n":"益智","v":68},{"n":"儿歌","v":65},{"n":"相声","v":81}]}],"3":[{"key":"area","name":"地区","value":[{"n":"全部","v":0},{"n":"内地","v":1},{"n":"中国香港","v":2},{"n":"中国台湾","v":3},{"n":"韩国","v":4},{"n":"日本","v":5},{"n":"泰国","v":6},{"n":"美国","v":7},{"n":"英国","v":8},{"n":"新加坡","v":9},{"n":"法国","v":10},{"n":"德国","v":11},{"n":"印度","v":12},{"n":"欧美","v":13},{"n":"其他","v":14}]},{"key":"year","name":"年份","value":[{"n":"全部","v":0},{"n":"2022","v":20},{"n":"2021","v":19},{"n":"2020","v":18},{"n":"2019","v":17},{"n":"2018","v":16},{"n":"2017","v":15},{"n":"2016","v":14},{"n":"2015","v":13},{"n":"2014","v":12},{"n":"2013","v":11},{"n":"2012","v":10},{"n":"2011","v":9},{"n":"2010","v":8},{"n":"2009","v":7},{"n":"2008","v":6},{"n":"2007","v":5},{"n":"2006","v":4},{"n":"2005","v":3},{"n":"2004","v":2},{"n":"更早","v":1}]},{"key":"class","name":"剧情","value":[{"n":"全部","v":0},{"n":"游戏","v":45},{"n":"推理","v":57},{"n":"真人秀","v":33},{"n":"生活","v":39},{"n":"言情","v":1},{"n":"青春","v":15},{"n":"爱情","v":21},{"n":"情感","v":38},{"n":"恋爱","v":58},{"n":"都市","v":6},{"n":"家庭","v":16},{"n":"电影版","v":74},{"n":"育儿","v":100},{"n":"脱口秀","v":32},{"n":"少儿","v":46},{"n":"动画","v":26},{"n":"教育","v":90},{"n":"亲子","v":64},{"n":"竞赛","v":101},{"n":"搞笑","v":34},{"n":"原创","v":86},{"n":"文化","v":84},{"n":"科普","v":102},{"n":"体育","v":47},{"n":"灾难","v":103},{"n":"同性","v":111},{"n":"时实","v":103},{"n":"军事","v":9},{"n":"军旅","v":104},{"n":"战争","v":25},{"n":"启蒙","v":105},{"n":"舞蹈","v":106},{"n":"竞技","v":70},{"n":"采访","v":107},{"n":"访谈","v":37},{"n":"戏曲","v":108},{"n":"革命","v":109},{"n":"历史","v":11},{"n":"纪录","v":28},{"n":"文艺","v":27},{"n":"传记","v":29},{"n":"人文","v":83},{"n":"文献","v":91},{"n":"音乐","v":41},{"n":"励志","v":12},{"n":"选秀","v":35},{"n":"动作","v":17},{"n":"冒险","v":56},{"n":"偶像","v":7},{"n":"剧情","v":2},{"n":"农村","v":88},{"n":"神话","v":13},{"n":"奇幻","v":24},{"n":"经典","v":55},{"n":"谍战","v":14},{"n":"歌舞","v":30},{"n":"美术","v":49},{"n":"校园","v":61},{"n":"社会","v":71},{"n":"旅游","v":82},{"n":"喜剧","v":4},{"n":"伦理","v":3},{"n":"悬疑","v":5},{"n":"科幻","v":20},{"n":"犯罪","v":23},{"n":"惊悚","v":31},{"n":"古装","v":8},{"n":"恐怖","v":22},{"n":"警匪","v":10},{"n":"纪实","v":48},{"n":"美食","v":43},{"n":"动物","v":62},{"n":"友情","v":72},{"n":"儿歌","v":65},{"n":"热血","v":53},{"n":"治愈","v":59},{"n":"运动","v":66},{"n":"魔幻","v":85},{"n":"晚会","v":40},{"n":"真人版","v":73},{"n":"益智","v":68},{"n":"分享","v":98},{"n":"其他","v":79},{"n":"自然","v":89},{"n":"相声","v":81},{"n":"八卦","v":36},{"n":"播报","v":52},{"n":"时尚","v":44},{"n":"汽车","v":51},{"n":"职场","v":42},{"n":"新闻","v":96},{"n":"财经","v":50},{"n":"科学","v":92},{"n":"教学","v":99},{"n":"解说","v":93},{"n":"枪战","v":98},{"n":"宣传","v":97},{"n":"战斗","v":80},{"n":"刑侦","v":87},{"n":"童话","v":69},{"n":"怪物","v":67},{"n":"武侠","v":19},{"n":"演讲","v":95},{"n":"明星","v":116},{"n":"游戏竞技","v":124}]}],"4":[{"key":"area","name":"\u5730\u533a","value":[{"n":"\u5168\u90e8","v":0},{"n":"\u5185\u5730","v":1},{"n":"\u4e2d\u56fd\u9999\u6e2f","v":2},{"n":"\u4e2d\u56fd\u53f0\u6e7e","v":3},{"n":"\u97e9\u56fd","v":4},{"n":"\u65e5\u672c","v":5},{"n":"\u6cf0\u56fd","v":6},{"n":"\u7f8e\u56fd","v":7},{"n":"\u82f1\u56fd","v":8},{"n":"\u65b0\u52a0\u5761","v":9},{"n":"\u6cd5\u56fd","v":10},{"n":"\u5fb7\u56fd","v":11},{"n":"\u5370\u5ea6","v":12},{"n":"\u6b27\u7f8e","v":13},{"n":"\u5176\u4ed6","v":14}]},{"key":"year","name":"\u5e74\u4efd","value":[{"n":"\u5168\u90e8","v":0},{"n":"2022","v":20},{"n":"2021","v":19},{"n":"2020","v":18},{"n":"2019","v":17},{"n":"2018","v":16},{"n":"2017","v":15},{"n":"2016","v":14},{"n":"2015","v":13},{"n":"2014","v":12},{"n":"2013","v":11},{"n":"2012","v":10},{"n":"2011","v":9},{"n":"2010","v":8},{"n":"2009","v":7},{"n":"2008","v":6},{"n":"2007","v":5},{"n":"2006","v":4},{"n":"2005","v":3},{"n":"2004","v":2},{"n":"\u66f4\u65e9","v":1}]},{"key":"class","name":"\u5267\u60c5","value":[{"n":"\u5168\u90e8","v":0},{"n":"\u559c\u5267","v":4},{"n":"\u53e4\u88c5","v":8},{"n":"\u6b66\u4fa0","v":19},{"n":"\u52a8\u753b","v":26},{"n":"\u8a00\u60c5","v":1},{"n":"\u5386\u53f2","v":11},{"n":"\u641e\u7b11","v":34},{"n":"\u5192\u9669","v":56},{"n":"\u9b54\u5e7b","v":85},{"n":"\u52b1\u5fd7","v":12},{"n":"\u9752\u6625","v":15},{"n":"\u7231\u60c5","v":21},{"n":"\u6821\u56ed","v":61},{"n":"\u5bb6\u5ead","v":16},{"n":"\u5947\u5e7b","v":24},{"n":"\u7ecf\u5178","v":55},{"n":"\u4eb2\u5b50","v":64},{"n":"\u5267\u60c5","v":2},{"n":"\u604b\u7231","v":58},{"n":"\u7f8e\u5c11\u5973","v":54},{"n":"\u8fd0\u52a8","v":66},{"n":"\u52a8\u4f5c","v":17},{"n":"\u4f26\u7406","v":3},{"n":"\u70ed\u8840","v":53},{"n":"\u60ac\u7591","v":5},{"n":"\u6050\u6016","v":22},{"n":"\u60ca\u609a","v":31},{"n":"\u5076\u50cf","v":7},{"n":"\u7384\u5e7b","v":60},{"n":"\u5e7b\u60f3","v":60},{"n":"\u7535\u5f71\u7248","v":74},{"n":"\u79d1\u5e7b","v":20},{"n":"\u804c\u573a","v":42},{"n":"\u5176\u4ed6","v":79},{"n":"\u6cbb\u6108","v":59},{"n":"\u90fd\u5e02","v":6},{"n":"\u65b0\u756a\u52a8\u753b","v":77},{"n":"\u751f\u6d3b","v":39},{"n":"\u6218\u6597","v":80},{"n":"\u80b2\u513f","v":100},{"n":"\u76ca\u667a","v":68},{"n":"\u6587\u5316","v":84},{"n":"\u771f\u4eba\u7248","v":73},{"n":"\u79d1\u666e","v":102},{"n":"\u52a8\u7269","v":62},{"n":"\u821e\u8e48","v":106},{"n":"\u795e\u8bdd","v":13},{"n":"\u6218\u4e89","v":25},{"n":"\u771f\u4eba\u79c0","v":33},{"n":"\u5c11\u513f","v":46},{"n":"\u7ae5\u8bdd","v":69},{"n":"\u5b8c\u7ed3\u52a8\u753b","v":78},{"n":"\u6559\u80b2","v":90},{"n":"\u7ade\u6280","v":70},{"n":"\u4f53\u80b2","v":47},{"n":"\u673a\u6218","v":63},{"n":"\u539f\u521b","v":86},{"n":"\u63a8\u7406","v":57},{"n":"\u6587\u827a","v":27},{"n":"\u60c5\u611f","v":38},{"n":"\u7f8e\u98df","v":43},{"n":"\u97f3\u4e50","v":41},{"n":"\u513f\u6b4c","v":65},{"n":"\u602a\u7269","v":67},{"n":"\u793e\u4f1a","v":71},{"n":"\u53cb\u60c5","v":72},{"n":"\u72af\u7f6a","v":23},{"n":"\u6b4c\u821e","v":30},{"n":"\u707e\u96be","v":103},{"n":"\u519b\u65c5","v":104},{"n":"\u5e74\u4ee3","v":110},{"n":"\u6e38\u620f","v":45},{"n":"\u540c\u6027","v":111},{"n":"\u5211\u4fa6","v":87},{"n":"TV\u7248","v":76},{"n":"\u8c0d\u6218","v":14},{"n":"OVA\u7248","v":75},{"n":"\u7eaa\u5f55","v":28},{"n":"\u4f20\u8bb0","v":29},{"n":"\u7f8e\u672f","v":49},{"n":"\u64ad\u62a5","v":52},{"n":"\u516b\u5366","v":36},{"n":"\u542f\u8499","v":105},{"n":"\u67aa\u6218","v":98},{"n":"\u81ea\u7136","v":89},{"n":"\u8131\u53e3\u79c0","v":32},{"n":"\u9009\u79c0","v":35},{"n":"\u65c5\u6e38","v":82},{"n":"\u7eaa\u5b9e","v":48},{"n":"\u60c5\u666f","v":18},{"n":"\u665a\u4f1a","v":40},{"n":"\u8bbf\u8c08","v":37},{"n":"\u65f6\u5c1a","v":44},{"n":"\u79d1\u5b66","v":92},{"n":"\u519b\u4e8b","v":9},{"n":"\u6587\u732e","v":91},{"n":"\u519c\u6751","v":88},{"n":"\u89e3\u8bf4","v":93},{"n":"\u65b0\u95fb","v":96},{"n":"\u8d22\u7ecf","v":50},{"n":"\u6c7d\u8f66","v":51},{"n":"\u56fd\u4ea7","v":112}]}],"5":[{"key":"area","name":"\u5730\u533a","value":[{"n":"\u5168\u90e8","v":0},{"n":"\u5185\u5730","v":1},{"n":"\u4e2d\u56fd\u9999\u6e2f","v":2},{"n":"\u4e2d\u56fd\u53f0\u6e7e","v":3},{"n":"\u97e9\u56fd","v":4},{"n":"\u65e5\u672c","v":5},{"n":"\u7f8e\u56fd","v":7},{"n":"\u82f1\u56fd","v":8},{"n":"\u6cd5\u56fd","v":10},{"n":"\u5fb7\u56fd","v":11},{"n":"\u5370\u5ea6","v":12},{"n":"\u6b27\u7f8e","v":13},{"n":"\u5176\u4ed6","v":14}]},{"key":"year","name":"\u5e74\u4efd","value":[{"n":"\u5168\u90e8","v":0},{"n":"2022","v":20},{"n":"2021","v":19},{"n":"2020","v":18},{"n":"2019","v":17},{"n":"2018","v":16},{"n":"2017","v":15},{"n":"2016","v":14},{"n":"2015","v":13},{"n":"2014","v":12},{"n":"2013","v":11},{"n":"2012","v":10},{"n":"2011","v":9},{"n":"2010","v":8},{"n":"2009","v":7},{"n":"2008","v":6},{"n":"2007","v":5},{"n":"2006","v":4},{"n":"2005","v":3},{"n":"2004","v":2},{"n":"\u66f4\u65e9","v":1}]},{"key":"class","name":"\u5267\u60c5","value":[{"n":"\u5168\u90e8","v":0},{"n":"\u5386\u53f2","v":11},{"n":"\u52b1\u5fd7","v":12},{"n":"\u72af\u7f6a","v":23},{"n":"\u793e\u4f1a","v":71},{"n":"\u6218\u4e89","v":25},{"n":"\u7eaa\u5f55","v":28},{"n":"\u7eaa\u5b9e","v":48},{"n":"\u81ea\u7136","v":89},{"n":"\u6587\u5316","v":84},{"n":"\u4f20\u8bb0","v":29},{"n":"\u97f3\u4e50","v":41},{"n":"\u89e3\u8bf4","v":93},{"n":"\u79d1\u666e","v":102},{"n":"\u795e\u8bdd","v":13},{"n":"\u9752\u6625","v":15},{"n":"\u5bb6\u5ead","v":16},{"n":"\u5267\u60c5","v":2},{"n":"\u7f8e\u98df","v":43},{"n":"\u5c11\u513f","v":46},{"n":"\u8fd0\u52a8","v":66},{"n":"\u5176\u4ed6","v":79},{"n":"\u79d1\u5e7b","v":20},{"n":"\u60ca\u609a","v":31},{"n":"\u52a8\u753b","v":26},{"n":"\u5192\u9669","v":56},{"n":"\u6587\u827a","v":27},{"n":"\u8131\u53e3\u79c0","v":32},{"n":"\u65b0\u95fb","v":96},{"n":"\u771f\u4eba\u79c0","v":33},{"n":"\u751f\u6d3b","v":39},{"n":"\u4f53\u80b2","v":47},{"n":"\u8d22\u7ecf","v":50},{"n":"\u52a8\u7269","v":62},{"n":"\u60c5\u611f","v":38},{"n":"\u7535\u5f71\u7248","v":74},{"n":"\u65c5\u6e38","v":82},{"n":"\u4eba\u6587","v":83},{"n":"\u519b\u4e8b","v":9},{"n":"\u6559\u80b2","v":90},{"n":"\u559c\u5267","v":4},{"n":"\u60ac\u7591","v":5},{"n":"\u6821\u56ed","v":61},{"n":"\u91c7\u8bbf","v":107},{"n":"\u79d1\u5b66","v":92}]}]} + } + def isVideoFormat(self,url): + pass + def manualVideoCheck(self): + pass + def localProxy(self,param): + return [200, "video/MP2T", action, ""]