diff --git a/jtx260111/api/XYDJ.py b/jtx260111/api/XYDJ.py new file mode 100644 index 0000000..8a7d540 --- /dev/null +++ b/jtx260111/api/XYDJ.py @@ -0,0 +1,343 @@ +# coding = utf-8 +# !/usr/bin/python + +""" +""" + +from Crypto.Util.Padding import unpad +from Crypto.Util.Padding import pad +from urllib.parse import unquote +from Crypto.Cipher import ARC4 +from urllib.parse import quote +from base.spider import Spider +from Crypto.Cipher import AES +from bs4 import BeautifulSoup +from base64 import b64decode +import urllib.request +import urllib.parse +import binascii +import requests +import base64 +import json +import time +import sys +import re +import os + +sys.path.append('..') + +xurl = "https://app.whjzjx.cn" + +headers = { + 'User-Agent': 'Linux; Android 12; Pixel 3 XL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.101 Mobile Safari/537.36' + } + +headerf = { + "platform": "1", + "user_agent": "Mozilla/5.0 (Linux; Android 9; V1938T Build/PQ3A.190705.08211809; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.114 Safari/537.36", + "content-type": "application/json; charset=utf-8" + } + +times = int(time.time() * 1000) + +data = { + "device": "2a50580e69d38388c94c93605241fb306", + "package_name": "com.jz.xydj", + "android_id": "ec1280db12795506", + "install_first_open": True, + "first_install_time": 1752505243345, + "last_update_time": 1752505243345, + "report_link_url": "", + "authorization": "", + "timestamp": times + } + +plain_text = json.dumps(data, separators=(',', ':'), ensure_ascii=False) + +key = "B@ecf920Od8A4df7" +key_bytes = key.encode('utf-8') +plain_bytes = plain_text.encode('utf-8') +cipher = AES.new(key_bytes, AES.MODE_ECB) +padded_data = pad(plain_bytes, AES.block_size) +ciphertext = cipher.encrypt(padded_data) +encrypted = base64.b64encode(ciphertext).decode('utf-8') + +response = requests.post("https://u.shytkjgs.com/user/v3/account/login", headers=headerf, data=encrypted) +response_data = response.json() +Authorization = response_data['data']['token'] + +headerx = { + 'authorization': Authorization, + 'platform': '1', + 'version_name': '3.8.3.1' + } + +class Spider(Spider): + global xurl + global headerx + global headers + + def getName(self): + return "首页" + + def init(self, extend): + pass + + def isVideoFormat(self, url): + pass + + def manualVideoCheck(self): + pass + + def extract_middle_text(self, text, start_str, end_str, pl, start_index1: str = '', end_index2: str = ''): + if pl == 3: + plx = [] + while True: + start_index = text.find(start_str) + if start_index == -1: + break + end_index = text.find(end_str, start_index + len(start_str)) + if end_index == -1: + break + middle_text = text[start_index + len(start_str):end_index] + plx.append(middle_text) + text = text.replace(start_str + middle_text + end_str, '') + if len(plx) > 0: + purl = '' + for i in range(len(plx)): + matches = re.findall(start_index1, plx[i]) + output = "" + for match in matches: + match3 = re.search(r'(?:^|[^0-9])(\d+)(?:[^0-9]|$)', match[1]) + if match3: + number = match3.group(1) + else: + number = 0 + if 'http' not in match[0]: + output += f"#{match[1]}${number}{xurl}{match[0]}" + else: + output += f"#{match[1]}${number}{match[0]}" + output = output[1:] + purl = purl + output + "$$$" + purl = purl[:-3] + return purl + else: + return "" + else: + start_index = text.find(start_str) + if start_index == -1: + return "" + end_index = text.find(end_str, start_index + len(start_str)) + if end_index == -1: + return "" + + if pl == 0: + middle_text = text[start_index + len(start_str):end_index] + return middle_text.replace("\\", "") + + if pl == 1: + middle_text = text[start_index + len(start_str):end_index] + matches = re.findall(start_index1, middle_text) + if matches: + jg = ' '.join(matches) + return jg + + if pl == 2: + middle_text = text[start_index + len(start_str):end_index] + matches = re.findall(start_index1, middle_text) + if matches: + new_list = [f'{item}' for item in matches] + jg = '$$$'.join(new_list) + return jg + + def homeContent(self, filter): + result = {} + result = {"class": [{"type_id": "1", "type_name": "剧场"}, + {"type_id": "3", "type_name": "新剧"}, + {"type_id": "2", "type_name": "热播"}, + {"type_id": "7", "type_name": "星选"}, + {"type_id": "5", "type_name": "阳光"}], + } + + return result + + def homeVideoContent(self): + videos = [] + + url= f'{xurl}/v1/theater/home_page?theater_class_id=1&class2_id=4&page_num=1&page_size=24' + detail = requests.get(url=url, headers=headerx) + detail.encoding = "utf-8" + if detail.status_code == 200: + data = detail.json() + + for vod in data['data']['list']: + + name = vod['theater']['title'] + + id = vod['theater']['id'] + + pic = vod['theater']['cover_url'] + + remark = vod['theater']['play_amount_str'] + + video = { + "vod_id": id, + "vod_name": name, + "vod_pic": pic, + "vod_remarks": remark + } + videos.append(video) + + result = {'list': videos} + return result + + def categoryContent(self, cid, pg, filter, ext): + result = {} + videos = [] + + url = f'{xurl}/v1/theater/home_page?theater_class_id={cid}&page_num={pg}&page_size=24' + detail = requests.get(url=url,headers=headerx) + detail.encoding = "utf-8" + if detail.status_code == 200: + data = detail.json() + + for vod in data['data']['list']: + + name = vod['theater']['title'] + + id = vod['theater']['id'] + + pic = vod['theater']['cover_url'] + + remark = vod['theater']['theme'] + + video = { + "vod_id": id, + "vod_name": name, + "vod_pic": pic, + "vod_remarks": remark + } + videos.append(video) + + result = {'list': videos} + result['page'] = pg + result['pagecount'] = 9999 + result['limit'] = 90 + result['total'] = 999999 + return result + + def detailContent(self, ids): + did = ids[0] + result = {} + videos = [] + xianlu = '' + bofang = '' + + url = f'{xurl}/v2/theater_parent/detail?theater_parent_id={did}' + detail = requests.get(url=url, headers=headerx) + detail.encoding = "utf-8" + if detail.status_code == 200: + data = detail.json() + + url = 'https://fs-im-kefu.7moor-fs1.com/ly/4d2c3f00-7d4c-11e5-af15-41bf63ae4ea0/1732707176882/jiduo.txt' + response = requests.get(url) + response.encoding = 'utf-8' + code = response.text + name = self.extract_middle_text(code, "s1='", "'", 0) + Jumps = self.extract_middle_text(code, "s2='", "'", 0) + + content = '剧情:' + data['data']['introduction'] + + area = data['data']['desc_tags'][0] + + remarks = data['data']['filing'] + + # 修复剧集只有一集的问题 - 检查theaters数据是否存在且不为空 + if 'theaters' in data['data'] and data['data']['theaters']: + for sou in data['data']['theaters']: + id = sou['son_video_url'] + name = sou['num'] + bofang = bofang + str(name) + '$' + id + '#' + + bofang = bofang[:-1] if bofang.endswith('#') else bofang + xianlu = '星芽' + else: + # 如果没有theaters数据,检查是否有单个视频URL + if 'video_url' in data['data'] and data['data']['video_url']: + bofang = '1$' + data['data']['video_url'] + xianlu = '星芽' + else: + bofang = Jumps + xianlu = '1' + + videos.append({ + "vod_id": did, + "vod_content": content, + "vod_remarks": remarks, + "vod_area": area, + "vod_play_from": xianlu, + "vod_play_url": bofang + }) + + result['list'] = videos + return result + + def playerContent(self, flag, id, vipFlags): + + result = {} + result["parse"] = 0 + result["playUrl"] = '' + result["url"] = id + result["header"] = headers + return result + + def searchContentPage(self, key, quick, page): + result = {} + videos = [] + + payload = { + "text": key + } + + url = f"{xurl}/v3/search" + detail = requests.post(url=url, headers=headerx, json=payload) + if detail.status_code == 200: + detail.encoding = "utf-8" + data = detail.json() + + for vod in data['data']['theater']['search_data']: + + name = vod['title'] + + id = vod['id'] + + pic = vod['cover_url'] + + remark = vod['score_str'] + + video = { + "vod_id": id, + "vod_name": name, + "vod_pic": pic, + "vod_remarks": remark + } + videos.append(video) + + result['list'] = videos + result['page'] = page + result['pagecount'] = 9999 + result['limit'] = 90 + result['total'] = 999999 + return result + + def searchContent(self, key, quick, pg="1"): + return self.searchContentPage(key, quick, '1') + + def localProxy(self, params): + if params['type'] == "m3u8": + return self.proxyM3u8(params) + elif params['type'] == "media": + return self.proxyMedia(params) + elif params['type'] == "ts": + return self.proxyTs(params) + return None \ No newline at end of file diff --git a/jtx260111/api/喜马拉雅.py b/jtx260111/api/喜马拉雅.py new file mode 100644 index 0000000..0df199a --- /dev/null +++ b/jtx260111/api/喜马拉雅.py @@ -0,0 +1,220 @@ +#小心儿悠悠 +from urllib.parse import quote +from base.spider import Spider +import requests + +class Spider(Spider): + def __init__(self): + super().__init__() + + def getName(self): + return "喜马拉雅" + + def init(self, extend): + self.search_api = "https://api.cenguigui.cn/api/music/ximalaya.php" + + self.headers = { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36', + 'Referer': 'https://www.ximalaya.com/', + 'Host': 'api.cenguigui.cn' + } + + self.session = requests.Session() + self.session.headers.update(self.headers) + + def homeContent(self, filter): + categories = [ + {"type_id": "有声书", "type_name": "有声书"}, + {"type_id": "广播剧", "type_name": "广播剧"}, + {"type_id": "娱乐", "type_name": "娱乐"}, + {"type_id": "儿童", "type_name": "儿童"}, + {"type_id": "音乐", "type_name": "音乐"}, + {"type_id": "相声评书", "type_name": "相声评书"}, + {"type_id": "个人成长", "type_name": "个人成长"} + ] + + return {"class": categories} + + def categoryContent(self, cid, pg, filter, ext): + try: + page_num = int(pg) + url = f"{self.search_api}?name={quote(cid)}&page={page_num}" + + response = self.session.get(url, timeout=8) + data = response.json() + + if data.get('data'): + videos = [] + albums = data.get('data', []) + + for album in albums: + album_id = album.get('albumId', '') + videos.append({ + "vod_id": str(album_id), + "vod_name": album.get('title', ''), + "vod_pic": album.get('cover', ''), + "vod_remarks": f"{album.get('type', '')} | {album.get('Nickname', '')}" + }) + + return { + 'list': videos, + 'page': page_num, + 'pagecount': 999999, + 'limit': 20, + 'total': len(albums) + } + + except Exception as e:return {'list': []} + + def detailContent(self, ids): + try: + album_id = ids[0] + url = f"{self.search_api}?name={quote(album_id)}" + + response = self.session.get(url, timeout=8) + data = response.json() + + if data.get('data'): + album_info = data.get('data', [{}])[0] + + tracks = self._getAlbumTracks(album_id) + + play_urls = [] + for i, track in enumerate(tracks): + track_title = track.get('title', f'第{i+1}章') + track_id = track.get('trackId', '') + play_urls.append(f"{track_title}${album_id}_{track_id}_{i}") + + play_from = "喜马拉雅" + play_url = '#'.join(play_urls) + + return {'list': [{ + "vod_id": album_id, + "vod_name": album_info.get('title', ''), + "vod_pic": album_info.get('cover', ''), + "vod_actor": album_info.get('Nickname', ''), + "vod_year": "", + "vod_content": album_info.get('intro', ''), + "vod_remarks": f"类型:{album_info.get('type', '')}|共{len(tracks)}集", + "vod_play_from": play_from, + "vod_play_url": play_url + }]} + + except Exception as e:return {'list': []} + + def _getAlbumTracks(self, album_id): + try: + url = f"{self.search_api}?albumId={album_id}" + response = self.session.get(url, timeout=8) + data = response.json() + + if data.get('data'): + return data.get('data', []) + + except Exception as e:return [] + + def playerContent(self, flag, id, vipFlags): + try: + if '$' in id: + album_name, album_id = id.split('$', 1) + else: + album_id = id + album_name = "未知专辑" + + if '_' in album_id: + parts = album_id.split('_') + if len(parts) >= 2: + track_id = parts[1] + else: + track_id = album_id + else: + track_id = album_id + + play_url = self._getPlayUrl(track_id) + + pic_url = self._getAlbumCover(album_id.split('_')[0] if '_' in album_id else album_id) + + headers = { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36', + 'Referer': 'https://www.ximalaya.com/' + } + + return { + "parse": 0, + "playUrl": '', + "url": play_url, + "header": headers, + "pic": pic_url + } + + except Exception as e:return { + "parse": 0, + "playUrl": '', + "url": '', + "header": { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36', + 'Referer': 'https://www.ximalaya.com/' + } + } + + def _getPlayUrl(self, track_id): + try: + parse_url = f"{self.search_api}?trackId={track_id}" + response = requests.get(parse_url, headers=self.headers, timeout=8) + data = response.json() + + if data.get('code') == 200: + return data.get('url', '') or data.get('data', '') + except Exception as e:return "" + + def _getAlbumCover(self, album_id): + try: + url = f"{self.search_api}?name={quote(album_id)}" + response = self.session.get(url, timeout=3) + data = response.json() + + if data.get('data'): + info = data.get('data', [{}])[0] + cover_url = info.get('cover', '') + if cover_url: + return cover_url + except Exception: + pass + + return "" + + def searchContent(self, key, quick, pg="1"): + try: + page_num = int(pg) + encoded_key = quote(key) + + url = f"{self.search_api}?name={encoded_key}&page={page_num}" + + response = self.session.get(url, timeout=6) + data = response.json() + + if data.get('data'): + videos = [] + albums = data.get('data', []) + + for album in albums: + album_id = album.get('albumId', '') + videos.append({ + "vod_id": str(album_id), + "vod_name": album.get('title', ''), + "vod_pic": album.get('cover', ''), + "vod_remarks": f"{album.get('type', '')} | {album.get('Nickname', '')}" + }) + + return { + 'list': videos, + 'page': page_num, + 'pagecount': 999999, + 'limit': 20, + 'total': len(albums) + } + + except Exception as e:return {'list': []} + + def localProxy(self, param): + return [] diff --git a/jtx260111/api/模板.js b/jtx260111/api/模板.js new file mode 100644 index 0000000..787f721 --- /dev/null +++ b/jtx260111/api/模板.js @@ -0,0 +1,304 @@ +if (typeof Object.assign != 'function') { + Object.assign = function () { + var target = arguments[0]; + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; +}; +} +function getMubans() { + var mubanDict = { // 模板字典 + mxpro: { + title: '', + host: '', + // homeUrl:'/', + url: '/vodshow/fyclass--------fypage---.html', + searchUrl: '/vodsearch/**----------fypage---.html', + searchable: 2,//是否启用全局搜索, + quickSearch: 0,//是否启用快速搜索, + filterable: 0,//是否启用分类筛选, + headers: {//网站的请求头,完整支持所有的,常带ua和cookies + 'User-Agent': 'MOBILE_UA', + // "Cookie": "searchneed=ok" + }, + class_parse: '.navbar-items li:gt(2):lt(8);a&&Text;a&&href;/(\\d+).html', + play_parse: true, + lazy: '', + limit: 6, + 推荐: '.tab-list.active;a.module-poster-item.module-item;.module-poster-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href', + double: true, // 推荐内容是否双层定位 + 一级: 'body a.module-poster-item.module-item;a&&title;.lazyload&&data-original;.module-item-note&&Text;a&&href', + 二级: { + "title": "h1&&Text;.module-info-tag&&Text", + "img": ".lazyload&&data-original", + "desc": ".module-info-item:eq(1)&&Text;.module-info-item:eq(2)&&Text;.module-info-item:eq(3)&&Text", + "content": ".module-info-introduction&&Text", + "tabs": ".module-tab-item", + "lists": ".module-play-list:eq(#id) a" + }, + 搜索: 'body .module-item;.module-card-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href;.module-info-item-content&&Text', + }, + mxone5: { + title: '', + host: '', + url: '/show/fyclass--------fypage---.html', + searchUrl: '/search/**----------fypage---.html', + searchable: 2,//是否启用全局搜索, + quickSearch: 0,//是否启用快速搜索, + filterable: 0,//是否启用分类筛选, + class_parse: '.nav-menu-items&&li;a&&Text;a&&href;.*/(.*?).html', + play_parse: true, + lazy: '', + limit: 6, + 推荐: '.module-list;.module-items&&.module-item;a&&title;img&&data-src;.module-item-text&&Text;a&&href', + double: true, // 推荐内容是否双层定位 + 一级: '.module-items .module-item;a&&title;img&&data-src;.module-item-text&&Text;a&&href', + 二级: { + "title": "h1&&Text;.tag-link&&Text", + "img": ".module-item-pic&&img&&data-src", + "desc": ".video-info-items:eq(0)&&Text;.video-info-items:eq(1)&&Text;.video-info-items:eq(2)&&Text;.video-info-items:eq(3)&&Text", + "content": ".vod_content&&Text", + "tabs": ".module-tab-item", + "lists": ".module-player-list:eq(#id)&&.scroll-content&&a" + }, + 搜索: '.module-items .module-search-item;a&&title;img&&data-src;.video-serial&&Text;a&&href', + }, + 首图: { + title: '', + host: '', + url: '/vodshow/fyclass--------fypage---/', + searchUrl: '/vodsearch/**----------fypage---.html', + searchable: 2,//是否启用全局搜索, + quickSearch: 0,//是否启用快速搜索, + filterable: 0,//是否启用分类筛选, + headers: {//网站的请求头,完整支持所有的,常带ua和cookies + 'User-Agent': 'MOBILE_UA', + // "Cookie": "searchneed=ok" + }, + class_parse: '.myui-header__menu li.hidden-sm:gt(0):lt(5);a&&Text;a&&href;/(\\d+).html', + play_parse: true, + lazy: '', + limit: 6, + 推荐: 'ul.myui-vodlist.clearfix;li;a&&title;a&&data-original;.pic-text&&Text;a&&href', + double: true, // 推荐内容是否双层定位 + 一级: '.myui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href', + 二级: { + "title": ".myui-content__detail .title&&Text;.myui-content__detail p:eq(-2)&&Text", + "img": ".myui-content__thumb .lazyload&&data-original", + "desc": ".myui-content__detail p:eq(0)&&Text;.myui-content__detail p:eq(1)&&Text;.myui-content__detail p:eq(2)&&Text", + "content": ".content&&Text", + "tabs": ".nav-tabs:eq(0) li", + "lists": ".myui-content__list:eq(#id) li" + }, + 搜索: '#searchList li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text', + }, + 首图2: { + title: '', + host: '', + url: '/list/fyclass-fypage.html', + searchUrl: '/vodsearch/**----------fypage---.html', + searchable: 2,//是否启用全局搜索, + quickSearch: 0,//是否启用快速搜索, + filterable: 0,//是否启用分类筛选, + headers: { + 'User-Agent': 'UC_UA', + // "Cookie": "" + }, + // class_parse:'.stui-header__menu li:gt(0):lt(7);a&&Text;a&&href;/(\\d+).html', + class_parse: '.stui-header__menu li:gt(0):lt(7);a&&Text;a&&href;.*/(.*?).html', + play_parse: true, + lazy: '', + limit: 6, + 推荐: 'ul.stui-vodlist.clearfix;li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href', + double: true, // 推荐内容是否双层定位 + 一级: '.stui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href', + 二级: { + "title": ".stui-content__detail .title&&Text;.stui-content__detail p:eq(-2)&&Text", + "img": ".stui-content__thumb .lazyload&&data-original", + "desc": ".stui-content__detail p:eq(0)&&Text;.stui-content__detail p:eq(1)&&Text;.stui-content__detail p:eq(2)&&Text", + "content": ".detail&&Text", + "tabs": ".stui-vodlist__head h3", + "lists": ".stui-content__playlist:eq(#id) li" + }, + 搜索: 'ul.stui-vodlist__media:eq(0) li,ul.stui-vodlist:eq(0) li,#searchList li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text', + 搜索1: 'ul.stui-vodlist&&li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text', + 搜索2: 'ul.stui-vodlist__media&&li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text', + }, + 默认: { + title: '', + host: '', + url: '/vodshow/fyclass--------fypage---.html', + searchUrl: '/vodsearch/-------------.html?wd=**', + searchable: 2,//是否启用全局搜索, + quickSearch: 0,//是否启用快速搜索, + filterable: 0,//是否启用分类筛选, + headers: { + 'User-Agent': 'MOBILE_UA', + }, + play_parse: true, + lazy: '', + limit: 6, + double: true, // 推荐内容是否双层定位 + }, + vfed: { + title: '', + host: '', + url: '/index.php/vod/show/id/fyclass/page/fypage.html', + searchUrl: '/index.php/vod/search/page/fypage/wd/**.html', + searchable: 2,//是否启用全局搜索, + quickSearch: 0,//是否启用快速搜索, + filterable: 0,//是否启用分类筛选, + headers: { + 'User-Agent': 'UC_UA', + }, + // class_parse:'.fed-pops-navbar&&ul.fed-part-rows&&a.fed-part-eone:gt(0):lt(5);a&&Text;a&&href;.*/(.*?).html', + class_parse: '.fed-pops-navbar&&ul.fed-part-rows&&a;a&&Text;a&&href;.*/(.*?).html', + play_parse: true, + lazy: '', + limit: 6, + 推荐: 'ul.fed-list-info.fed-part-rows;li;a.fed-list-title&&Text;a&&data-original;.fed-list-remarks&&Text;a&&href', + double: true, // 推荐内容是否双层定位 + 一级: '.fed-list-info&&li;a.fed-list-title&&Text;a&&data-original;.fed-list-remarks&&Text;a&&href', + 二级: { + "title": "h1.fed-part-eone&&Text;.fed-deta-content&&.fed-part-rows&&li&&Text", + "img": ".fed-list-info&&a&&data-original", + "desc": ".fed-deta-content&&.fed-part-rows&&li:eq(1)&&Text;.fed-deta-content&&.fed-part-rows&&li:eq(2)&&Text;.fed-deta-content&&.fed-part-rows&&li:eq(3)&&Text", + "content": ".fed-part-esan&&Text", + "tabs": ".fed-drop-boxs&&.fed-part-rows&&li", + "lists": ".fed-play-item:eq(#id)&&ul:eq(1)&&li" + }, + 搜索: '.fed-deta-info;h1&&Text;.lazyload&&data-original;.fed-list-remarks&&Text;a&&href;.fed-deta-content&&Text', + }, + 海螺3: { + title: '', + host: '', + searchUrl: '/v_search/**----------fypage---.html', + url: '/vod_____show/fyclass--------fypage---.html', + headers: { + 'User-Agent': 'MOBILE_UA' + }, + timeout: 5000, + class_parse: 'body&&.hl-nav li:gt(0);a&&Text;a&&href;.*/(.*?).html', + cate_exclude: '明星|专题|最新|排行', + limit: 40, + play_parse: true, + lazy: '', + 推荐: '.hl-vod-list;li;a&&title;a&&data-original;.remarks&&Text;a&&href', + double: true, + 一级: '.hl-vod-list&&.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href', + 二级: { + "title": ".hl-infos-title&&Text;.hl-text-conch&&Text", + "img": ".hl-lazy&&data-original", + "desc": ".hl-infos-content&&.hl-text-conch&&Text", + "content": ".hl-content-text&&Text", + "tabs": ".hl-tabs&&a", + "lists": ".hl-plays-list:eq(#id)&&li" + }, + 搜索: '.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href', + searchable: 2,//是否启用全局搜索, + quickSearch: 0,//是否启用快速搜索, + filterable: 0,//是否启用分类筛选, + }, + 海螺2: { + title: '', + host: '', + searchUrl: '/index.php/vod/search/page/fypage/wd/**/', + url: '/index.php/vod/show/id/fyclass/page/fypage/', + headers: { + 'User-Agent': 'MOBILE_UA' + }, + timeout: 5000, + class_parse: '#nav-bar li;a&&Text;a&&href;id/(.*?)/', + limit: 40, + play_parse: true, + lazy: '', + 推荐: '.list-a.size;li;a&&title;.lazy&&data-original;.bt&&Text;a&&href', + double: true, + 一级: '.list-a&&li;a&&title;.lazy&&data-original;.list-remarks&&Text;a&&href', + 二级: { + "title": "h2&&Text;.deployment&&Text", + "img": ".lazy&&data-original", + "desc": ".deployment&&Text", + "content": ".ec-show&&Text", + "tabs": "#tag&&a", + "lists": ".play_list_box:eq(#id)&&li" + }, + 搜索: '.search-list;a&&title;.lazy&&data-original;.deployment&&Text;a&&href', + searchable: 2,//是否启用全局搜索, + quickSearch: 0,//是否启用快速搜索, + filterable: 0,//是否启用分类筛选, + }, + 短视: { + title: '', + host: '', + // homeUrl:'/', + url: '/channel/fyclass-fypage.html', + searchUrl: '/search.html?wd=**', + searchable: 2,//是否启用全局搜索, + quickSearch: 0,//是否启用快速搜索, + filterable: 0,//是否启用分类筛选, + headers: {//网站的请求头,完整支持所有的,常带ua和cookies + 'User-Agent': 'MOBILE_UA', + // "Cookie": "searchneed=ok" + }, + class_parse: '.menu_bottom ul li;a&&Text;a&&href;.*/(.*?).html', + cate_exclude: '解析|动态', + play_parse: true, + lazy: '', + limit: 6, + 推荐: '.indexShowBox;ul&&li;a&&title;img&&data-src;.s1&&Text;a&&href', + double: true, // 推荐内容是否双层定位 + 一级: '.pic-list&&li;a&&title;img&&data-src;.s1&&Text;a&&href', + 二级: { + "title": "h1&&Text;.content-rt&&p:eq(0)&&Text", + "img": ".img&&img&&data-src", + "desc": ".content-rt&&p:eq(1)&&Text;.content-rt&&p:eq(2)&&Text;.content-rt&&p:eq(3)&&Text;.content-rt&&p:eq(4)&&Text;.content-rt&&p:eq(5)&&Text", + "content": ".zkjj_a&&Text", + "tabs": ".py-tabs&&option", + "lists": ".player:eq(#id) li" + }, + 搜索: '.sr_lists&&ul&&li;h3&&Text;img&&data-src;.int&&p:eq(0)&&Text;a&&href', + }, + 短视2:{ + title: '', + host: '', + class_name:'电影&电视剧&综艺&动漫', + class_url:'1&2&3&4', + searchUrl: '/index.php/ajax/suggest?mid=1&wd=**&limit=50', + searchable: 2, + quickSearch: 0, + headers:{'User-Agent':'MOBILE_UA'}, + url: '/index.php/api/vod#type=fyclass&page=fypage', + filterable:0,//是否启用分类筛选, + filter_url:'', + filter: {}, + filter_def:{}, + detailUrl:'/index.php/vod/detail/id/fyid.html', + play_parse: true, + lazy: '', + limit: 6, + 推荐:'.list-vod.flex .public-list-box;a&&title;.lazy&&data-original;.public-list-prb&&Text;a&&href', + 一级:'js:let body=input.split("#")[1];let t=Math.round(new Date/1e3).toString();let key=md5("DS"+t+"DCC147D11943AF75");let url=input.split("#")[0];body=body+"&time="+t+"&key="+key;print(body);fetch_params.body=body;let html=post(url,fetch_params);let data=JSON.parse(html);VODS=data.list.map(function(it){it.vod_pic=urljoin2(input.split("/i")[0],it.vod_pic);return it});', + 二级:{ + "title":".slide-info-title&&Text;.slide-info:eq(3)--strong&&Text", + "img":".detail-pic&&data-original", + "desc":".fraction&&Text;.slide-info-remarks:eq(1)&&Text;.slide-info-remarks:eq(2)&&Text;.slide-info:eq(2)--strong&&Text;.slide-info:eq(1)--strong&&Text", + "content":"#height_limit&&Text", + "tabs":".anthology.wow.fadeInUp.animated&&.swiper-wrapper&&a", + "tab_text":".swiper-slide&&Text", + "lists":".anthology-list-box:eq(#id) li" + }, + 搜索:'json:list;name;pic;;id', + } + }; + return JSON.parse(JSON.stringify(mubanDict)); +} +var mubanDict = getMubans(); +var muban = getMubans(); +export default {muban,getMubans}; \ No newline at end of file