From 7982fbb987768e9f8f364ac36742f029dffbd9e3 Mon Sep 17 00:00:00 2001 From: lushunming <1357197829@qq.com> Date: Thu, 15 Aug 2024 09:24:05 +0800 Subject: [PATCH] =?UTF-8?q?js=E7=88=AC=E8=99=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jar/js/4kysxz.js | 238 + jar/js/aiyingshi.js | 299 + jar/js/alipansou.js | 229 + jar/js/aliyunpanshare.js | 227 + jar/js/asianx.js | 183 + jar/js/audiomack.js | 258 + jar/js/base_spider.js | 85 + jar/js/bilibili.js | 571 + jar/js/bookan.js | 152 + jar/js/bqg_open.js | 268 + jar/js/changzhang.js | 333 + jar/js/ciliduo.js | 191 + jar/js/cilixiong.js | 253 + jar/js/cntv.js | 364 + jar/js/copymanga.js | 233 + jar/js/dj0898_book_open.js | 215 + jar/js/doll.js | 246 + jar/js/douban.js | 636 + jar/js/dubo.js | 75 + jar/js/dygangs.js | 280 + jar/js/dyttbt.js | 214 + jar/js/feifan.js | 96 + jar/js/feifan18.js | 96 + jar/js/freeok.js | 333 + jar/js/gitcafe.js | 231 + jar/js/haiwaikan.js | 156 + jar/js/hanxiucao.js | 625 + jar/js/haoxi.js | 273 + jar/js/hscangku.js | 153 + jar/js/huya.js | 709 + jar/js/ikanbot.js | 319 + jar/js/jable.js | 317 + jar/js/jiafeimao.js | 295 + jar/js/jianpian.js | 482 + jar/js/jiujiuliu.js | 174 + jar/js/kankan70.js | 308 + jar/js/kuaikan.js | 444 + jar/js/liangzi.js | 93 + jar/js/liangzi18.js | 93 + jar/js/liujiushu.js | 260 + jar/js/lovemovie.js | 328 + jar/js/lovemovie18.js | 133 + jar/js/mhdq.js | 181 + jar/js/mp4movie.js | 282 + jar/js/mxanime.js | 429 + jar/js/nangua.js | 61 +- jar/js/newvision.js | 261 + jar/js/nivod.js | 243 + jar/js/nivod_18.js | 242 + jar/js/pan_search.js | 149 + jar/js/pipixia.js | 459 + jar/js/push_agent.js | 115 + jar/js/sehuatang.js | 251 + jar/js/sp360.js | 672 + jar/js/spider.js | 901 + jar/js/star.js | 290 + jar/js/testSpider.js | 128 + jar/js/tiantian.js | 286 + jar/js/ttkan.js | 343 + jar/js/vodSpider.js | 192 + jar/js/weixine.js | 322 + jar/js/wogg.js | 314 + jar/js/xb6v.js | 304 + jar/js/yiqikan.js | 268 + jar/lib/TextDecoder.js | 190 + jar/lib/TextEncoder.js | 107 + jar/lib/ali.js | 86 + jar/lib/ali_api.js | 677 + jar/lib/ali_object.js | 516 + jar/lib/big5.js | 154 + jar/lib/bilibili_ASS_Danmaku_Downloader.js | 31 + jar/lib/book.js | 76 + jar/lib/cat.js | 15158 +++++++++ jar/lib/cloud.js | 107 + jar/lib/danmuSpider.js | 188 + jar/lib/encoding-indexes.js | 37 + jar/lib/encodings.js | 460 + jar/lib/euc-jp.js | 166 + jar/lib/euc-kr.js | 124 + jar/lib/ffm3u8_open.js | 480 + jar/lib/gb18030.js | 251 + jar/lib/gbk_us.js | 32194 +++++++++++++++++++ jar/lib/hls.js | 940 + jar/lib/iso-2022-jp.js | 441 + jar/lib/log.js | 86 + jar/lib/misc.js | 129 + jar/lib/nivid_object.js | 255 + jar/lib/pipiXiaObject.js | 146 + jar/lib/quark.js | 66 + jar/lib/quark_api.js | 313 + jar/lib/quark_object.js | 98 + jar/lib/shift-jis.js | 170 + jar/lib/similarity.js | 53 + jar/lib/single-byte.js | 86 + jar/lib/table.js | 119 + jar/lib/tencentDanmu.js | 84 + jar/lib/text_decoder_index.js | 118 + jar/lib/text_decoder_indexes.js | 153 + jar/lib/text_decoder_utils.js | 180 + jar/lib/utf16.js | 139 + jar/lib/utf8.js | 208 + jar/lib/utils.js | 385 + jar/lib/vod.js | 62 + jar/lib/x-user-defined.js | 56 + json/index.json | 332 +- 105 files changed, 73756 insertions(+), 26 deletions(-) create mode 100644 jar/js/4kysxz.js create mode 100644 jar/js/aiyingshi.js create mode 100644 jar/js/alipansou.js create mode 100644 jar/js/aliyunpanshare.js create mode 100644 jar/js/asianx.js create mode 100644 jar/js/audiomack.js create mode 100644 jar/js/base_spider.js create mode 100644 jar/js/bilibili.js create mode 100644 jar/js/bookan.js create mode 100644 jar/js/bqg_open.js create mode 100644 jar/js/changzhang.js create mode 100644 jar/js/ciliduo.js create mode 100644 jar/js/cilixiong.js create mode 100644 jar/js/cntv.js create mode 100644 jar/js/copymanga.js create mode 100644 jar/js/dj0898_book_open.js create mode 100644 jar/js/doll.js create mode 100644 jar/js/douban.js create mode 100644 jar/js/dubo.js create mode 100644 jar/js/dygangs.js create mode 100644 jar/js/dyttbt.js create mode 100644 jar/js/feifan.js create mode 100644 jar/js/feifan18.js create mode 100644 jar/js/freeok.js create mode 100644 jar/js/gitcafe.js create mode 100644 jar/js/haiwaikan.js create mode 100644 jar/js/hanxiucao.js create mode 100644 jar/js/haoxi.js create mode 100644 jar/js/hscangku.js create mode 100644 jar/js/huya.js create mode 100644 jar/js/ikanbot.js create mode 100644 jar/js/jable.js create mode 100644 jar/js/jiafeimao.js create mode 100644 jar/js/jianpian.js create mode 100644 jar/js/jiujiuliu.js create mode 100644 jar/js/kankan70.js create mode 100644 jar/js/kuaikan.js create mode 100644 jar/js/liangzi.js create mode 100644 jar/js/liangzi18.js create mode 100644 jar/js/liujiushu.js create mode 100644 jar/js/lovemovie.js create mode 100644 jar/js/lovemovie18.js create mode 100644 jar/js/mhdq.js create mode 100644 jar/js/mp4movie.js create mode 100644 jar/js/mxanime.js create mode 100644 jar/js/newvision.js create mode 100644 jar/js/nivod.js create mode 100644 jar/js/nivod_18.js create mode 100644 jar/js/pan_search.js create mode 100644 jar/js/pipixia.js create mode 100644 jar/js/push_agent.js create mode 100644 jar/js/sehuatang.js create mode 100644 jar/js/sp360.js create mode 100644 jar/js/spider.js create mode 100644 jar/js/star.js create mode 100644 jar/js/testSpider.js create mode 100644 jar/js/tiantian.js create mode 100644 jar/js/ttkan.js create mode 100644 jar/js/vodSpider.js create mode 100644 jar/js/weixine.js create mode 100644 jar/js/wogg.js create mode 100644 jar/js/xb6v.js create mode 100644 jar/js/yiqikan.js create mode 100644 jar/lib/TextDecoder.js create mode 100644 jar/lib/TextEncoder.js create mode 100644 jar/lib/ali.js create mode 100644 jar/lib/ali_api.js create mode 100644 jar/lib/ali_object.js create mode 100644 jar/lib/big5.js create mode 100644 jar/lib/bilibili_ASS_Danmaku_Downloader.js create mode 100644 jar/lib/book.js create mode 100644 jar/lib/cat.js create mode 100644 jar/lib/cloud.js create mode 100644 jar/lib/danmuSpider.js create mode 100644 jar/lib/encoding-indexes.js create mode 100644 jar/lib/encodings.js create mode 100644 jar/lib/euc-jp.js create mode 100644 jar/lib/euc-kr.js create mode 100644 jar/lib/ffm3u8_open.js create mode 100644 jar/lib/gb18030.js create mode 100644 jar/lib/gbk_us.js create mode 100644 jar/lib/hls.js create mode 100644 jar/lib/iso-2022-jp.js create mode 100644 jar/lib/log.js create mode 100644 jar/lib/misc.js create mode 100644 jar/lib/nivid_object.js create mode 100644 jar/lib/pipiXiaObject.js create mode 100644 jar/lib/quark.js create mode 100644 jar/lib/quark_api.js create mode 100644 jar/lib/quark_object.js create mode 100644 jar/lib/shift-jis.js create mode 100644 jar/lib/similarity.js create mode 100644 jar/lib/single-byte.js create mode 100644 jar/lib/table.js create mode 100644 jar/lib/tencentDanmu.js create mode 100644 jar/lib/text_decoder_index.js create mode 100644 jar/lib/text_decoder_indexes.js create mode 100644 jar/lib/text_decoder_utils.js create mode 100644 jar/lib/utf16.js create mode 100644 jar/lib/utf8.js create mode 100644 jar/lib/utils.js create mode 100644 jar/lib/vod.js create mode 100644 jar/lib/x-user-defined.js diff --git a/jar/js/4kysxz.js b/jar/js/4kysxz.js new file mode 100644 index 00000000..fd80b2fa --- /dev/null +++ b/jar/js/4kysxz.js @@ -0,0 +1,238 @@ +/* +* @File : 4kysxz.js.js +* @Author : jade +* @Date : 2024/1/24 16:47 +* @Email : jadehh@1ive.com +* @Software : Samples +* @Desc : 4k高清网 (已失效) +*/ +import {_} from '../lib/cat.js'; +import {VodDetail, VodShort} from "../lib/vod.js" +import * as Utils from "../lib/utils.js"; +import {Spider} from "./spider.js"; + +class YSXZSpider extends Spider { + constructor() { + super(); + this.siteUrl = "https://4kysxz.top" + } + + getAppName() { + return `4K高清网` + } + + getName() { + return `🚄┃4K高清网┃🚄` + } + + getJSName() { + return "4kysxz" + } + + getType() { + return 3 + } + + async init(cfg) { + await super.init(cfg); + } + + async parseVodShortListFromDoc($) { + const cards = $('div.row.posts-wrapper >div > article > div.entry-media > div > a') + return _.map(cards, (n) => { + let id = n.attribs['href']; + let name = $($(n).find('img')[0]).attr('alt').replaceAll('', '').replaceAll('', '').split(' ')[0]; + let pic = $($(n).find('img')[0]).attr('data-src'); + return { + vod_id: id, vod_name: name, vod_pic: pic, vod_remarks: '', + }; + }); + } + + async parseVodDetailFromDoc($) { + let vodDetail = new VodDetail(); + let vodElement = $("[class=\"entry-content u-text-format u-clearfix\"]") + let text = ""; + for (const vodEle of vodElement) { + text = text + $(vodEle).text().replaceAll(":", ":") + "\n" + } + vodDetail.vod_name = $($("[class=\"article-title\"]")).text() + vodDetail.vod_pic = $($("[class=\"entry-content u-text-format u-clearfix\"]")).find("img")[0].attribs["src"] + vodDetail.vod_area = Utils.getStrByRegex(/上映地区(.*?)\n/, text).replaceAll(":", "") + vodDetail.vod_director = Utils.getStrByRegex(/导演(.*?)\n/, text).replaceAll(":", "") + vodDetail.vod_actor = Utils.getStrByRegex(/主演(.*?)\n/, text).replaceAll(":", "") + vodDetail.vod_content = Utils.getStrByRegex(/剧情简介(.*?)\n/, text).replaceAll(":", "").replaceAll("·", "") + let actors = _.map($('div.entry-content.u-text-format.u-clearfix > div:nth-child(10) > div > span > span'), (n) => { + return $(n).text().split(' ')[0]; + }); + vodDetail.vod_actor = actors.join('/'); + let directors = _.map($('div.entry-content.u-text-format.u-clearfix > div:nth-child(6) > div > span'), (n) => { + return $(n).text().split(' ')[0]; + }); + vodDetail.vod_director = directors.join('/'); + vodDetail.vod_name = $('div.site-content > section > div > header > h1').text().trim(); + let playUrlStr = ''; + let playFromStr = ''; + //高清直播 + const cards = $('div.entry-content.u-text-format.u-clearfix > custag > ul > li > a'); + if (cards.length > 0) { + let playUrls = _.map(cards, (n) => { + let playUrl = n.attribs['href']; + if (playUrl.indexOf('url=') > 0) { + playUrl = playUrl.split('url=')[1].split('&name')[0]; + } + return $(n).text() + '$' + playUrl; + }); + playUrlStr = playUrls.join('#'); + playFromStr = '高清直播'; + } + if (!this.catOpenStatus) { + //磁力链接 + const tbs = $('loginshow > table'); + let playFrom = ''; + let nameUrls = []; + for (let i = 0; i < tbs.length; i++) { + if (i % 2 == 0) { + playFrom = $(tbs[i]).find('tbody > tr >td').text().replaceAll('WEB', '磁力'); + } else if (i % 2 == 1) { + const tds = $(tbs[i]).find('tbody > tr >td'); + let nameUrl = ''; + for (let j = 0; j < tds.length; j++) { + if (j % 2 == 0) { + nameUrl = $(tds[j]).text().split('.')[0].split(' ')[0]; + } else if (j % 2 == 1) { + nameUrl = nameUrl + '$' + $(tds[j]).text().split('【')[0]; + nameUrls.push(nameUrl); + } + } + if (playFromStr.length > 0) { + playFromStr += '$$$'; + playUrlStr += '$$$'; + } + playFromStr += playFrom; + playUrlStr += nameUrls.join('#'); + } + } + } + vodDetail.vod_play_from = playFromStr + vodDetail.vod_play_url = playUrlStr + return vodDetail + } + + + async setClasses() { + this.classes = [] + this.classes.push(this.getTypeDic("首页", "/#")) + } + + async getFilter(typeElements) { + let value_list = [] + value_list.push({ + "n": "全部", "v": "全部", + }) + for (const typeElement of typeElements) { + value_list.push({ + "n": typeElement.attribs["title"], + "v": typeElement.attribs["href"].split("/").slice(-1)[0].split(".")[0], + }) + } + return [{"key": "1", "name": "类型", "value": value_list}] + } + + async setFilterObj() { + let $ = await this.getHtml() + let navElements = $("[class=\"navbar-item menu-item-has-children\"]") + let extent_list = [] + for (const navElement of navElements) { + let type_name = $($(navElement).find("a")[0]).text() + if (type_name.indexOf("影视") > -1) { + let extend_dic = {"key": "1", "name": type_name, "value": []} + let type_elements = $($(navElement).find("ul")).find("a") + for (const type_element of type_elements) { + extend_dic["value"].push({"n": $(type_element).text(), "v": type_element.attribs["href"]}) + } + extent_list.push(extend_dic) + } + } + this.filterObj["/#"] = extent_list + } + + async setCategory(tid, pg, filter, extend) { + let url; + if (extend["1"] === undefined) { + url = this.siteUrl + tid + } else { + if (extend["1"].indexOf("category") > -1) { + url = this.siteUrl + extend["1"].split(".")[0] + "_" + pg + ".html" + } else { + url = this.siteUrl + extend["1"] + } + } + let $ = await this.getHtml(url) + this.vodList = await this.parseVodShortListFromDoc($) + } + + async setHomeVod() { + let $ = await this.getHtml() + this.homeVodList = await this.parseVodShortListFromDoc($) + } + + async setDetail(id) { + const $ = await this.getHtml(id); + this.vodDetail = await this.parseVodDetailFromDoc($) + } + + async setSearch(wd, quick) { + let $ = await this.getHtml(this.siteUrl + '/search.php?q=' + wd) + this.vodList = await this.parseVodShortListFromDoc($) + } +} + +let spider = new YSXZSpider() + +async function init(cfg) { + await spider.init(cfg) +} + +async function home(filter) { + return await spider.home(filter) +} + +async function homeVod() { + return await spider.homeVod() +} + +async function category(tid, pg, filter, extend) { + return await spider.category(tid, pg, filter, extend) +} + +async function detail(id) { + return await spider.detail(id) +} + +async function play(flag, id, flags) { + return await spider.play(flag, id, flags) +} + +async function search(wd, quick) { + return await spider.search(wd, quick) +} + +async function proxy(segments, headers) { + return await spider.proxy(segments, headers) +} + +export function __jsEvalReturn() { + return { + init: init, + home: home, + homeVod: homeVod, + category: category, + detail: detail, + play: play, + search: search, + proxy: proxy + }; +} + +export {spider} \ No newline at end of file diff --git a/jar/js/aiyingshi.js b/jar/js/aiyingshi.js new file mode 100644 index 00000000..b6a80cea --- /dev/null +++ b/jar/js/aiyingshi.js @@ -0,0 +1,299 @@ +/* + * @Author: samples jadehh@live.com + * @Date: 2023-12-14 11:03:04 + * @LastEditors: samples jadehh@live.com + * @LastEditTime: 2023-12-14 11:03:04 + * @FilePath: js/aiyingshi.js + * @Description: 爱影视爬虫类 + */ +import {_, load} from '../lib/cat.js'; +import {VodDetail, VodShort} from "../lib/vod.js" +import * as Utils from "../lib/utils.js"; +import {Spider} from "./spider.js"; + + +class AiYingShiSpider extends Spider { + constructor() { + super(); + this.siteUrl = 'https://aiyingshis.com'; + } + + getName() { + return "🚀‍┃爱影视┃🚀" + } + + getAppName() { + return "爱影视" + } + getJSName() { + return "aiyingshi" + } + + getType() { + return 3 + } + + async parseVodShortListFromDoc($) { + let items = $('.module-item'); + let vod_list = []; + for (const item of items) { + let vodShort = new VodShort() + let oneA = $(item).find('.module-item-cover .module-item-pic a').first(); + vodShort.vod_id = oneA.attr('href'); + vodShort.vod_name = oneA.attr('title'); + let pic = $(item).find('.module-item-cover .module-item-pic img').first().attr('data-src') + if (pic.indexOf("img.php?url=") > 0) { + pic = pic.split("img.php?url=")[1] + }else if (pic.indexOf("https:") === -1 && pic.indexOf("http:") === -1){ + pic = "https:" + pic + } + vodShort.vod_pic = pic + vodShort.vod_remarks = $(item).find('.module-item-text').first().text(); + if (vodShort.vod_name !== undefined){ + vod_list.push(vodShort) + } + + } + return vod_list + } + + async parseVodDetailFromDoc($) { + let vodDetail = new VodDetail() + vodDetail.vod_name = $('.page-title')[0].children[0].data + vodDetail.vod_pic = $($("[class=\"video-cover\"]")).find(".lazyload")[0].attribs["data-src"] + let video_info_list = $($(".video-info-aux")).text().replaceAll("\t","").split("\n") + let type_list = [] + for (const video_info of video_info_list){ + if (!_.isEmpty(video_info.replaceAll(" ","").replaceAll("/",""))){ + type_list.push(video_info.replaceAll(" ","").replaceAll("/","")) + } + } + vodDetail.type_name = type_list.slice(0,2).join("*") + let video_items = $("[class=\"video-info-items\"]") + vodDetail.vod_director = $(video_items[0]).find("a")[0].children[0].data + let vidoe_info_actor_list = $(video_items[1]).find("a") + let actor_list = [] + for (const vidoe_info_actor of vidoe_info_actor_list) { + actor_list.push(vidoe_info_actor.children[0].data) + } + vodDetail.vod_actor = actor_list.join(" * ") + vodDetail.vod_year = type_list[2] + vodDetail.vod_remarks = $($(video_items[3]).find(".video-info-item")).text() + vodDetail.vod_content = $($(video_items[5]).find(".video-info-item")).text() + vodDetail.vod_area = type_list[3] + vodDetail.vod_content = vodDetail.vod_content.replace("[收起部分]", "").replace("[展开全部]", "").replaceAll("\t","").replaceAll("\n","") + + let playElements = $($("[class=\"module-tab-content\"]")[0]).find("span") + let urlElements = $("[class=\"module-list module-player-list tab-list sort-list \"]") + let form_list = [] + for (const playerElement of playElements){ + form_list.push($(playerElement).text()) + } + let play_url_list = [] + for (const urlElement of urlElements){ + let playUrlElements = $($(urlElement).find("[class=\"sort-item\"]")).find("a") + let vodItems = [] + for (const playUrlElement of playUrlElements){ + let name = $(playUrlElement).text() + let url = playUrlElement.attribs["href"] + let play_url = name + "$" + url + vodItems.push(play_url) + } + play_url_list.push(vodItems.join("#")) + } + vodDetail.vod_play_from = form_list.join('$$$'); + vodDetail.vod_play_url = _.values(play_url_list).join('$$$'); + return vodDetail + } + + async parseVodShortListFromDocBySearch($) { + let items = $('.module-search-item'); + let vod_list = []; + for (const item of items) { + let vodShort = new VodShort() + vodShort.vod_id = $(item).find(".video-serial")[0].attribs.href; + vodShort.vod_name = $(item).find(".video-serial")[0].attribs.title; + vodShort.vod_pic = $(item).find(".module-item-pic > img")[0].attribs['data-src'] + vodShort.vod_remarks = $($(item).find(".video-serial")[0]).text(); + vod_list.push(vodShort); + } + return vod_list + } + + async setClasses() { + let con = await this.fetch(this.siteUrl, null, this.getHeader()); + if (!_.isEmpty(con)) { + const $ = load(con); + let elements = $($("[class=\"nav-menu-items\"]")[0]).find("li") + for (const element of elements.slice(0,6)) { + let type_name = $($(element).find("span")).text() + if (type_name !== "首页"){ + let type_id = $(element).find("a")[0].attribs["href"].split("/").slice(-1)[0].split(".")[0] + let type_dic = {"type_id": type_id, "type_name": type_name} + this.classes.push(type_dic) + } + } + } + } + + async getFilter($) { + let elements = $("[class=\"scroll-content\"]").slice(1) + let extend_list = [] + for (let i = 0; i < elements.length; i++) { + let extend_dic = {"key": (i + 1).toString(), "name": "", "value": []} + if (i < elements.length - 1) { + extend_dic["name"] = $($(elements[i]).find("a")[0]).text() + extend_dic["value"].push({"n": "全部", "v": "0"}) + for (const ele of $(elements[i]).find("a").slice(1)) { + if ($($(elements[i]).find("a")[0]).text() === "全部类型"){ + extend_dic["value"].push({"n": $(ele).text(), "v":ele.attribs["href"].split("/").slice(-1)[0].split(".")[0]}) + }else{ + extend_dic["value"].push({"n": $(ele).text(), "v":$(ele).text()}) + + } + } + extend_list.push(extend_dic) + } else { + extend_dic["name"] = $($(elements[i]).find("a")[0]).text() + extend_dic["value"] = [{"n": "全部", "v": "0"}, { + "n": $($(elements[i]).find("a")[1]).text(), + "v": "hits" + }, {"n": $($(elements[i]).find("a")[2]).text(), "v": "score"}] + + extend_list.push(extend_dic) + } + + } + return extend_list + } + + async setFilterObj() { + for (const type_dic of this.classes) { + let type_id = type_dic["type_id"] + if (type_id !== "/" && type_id !== "最近更新") { + let url = this.siteUrl + `/vodshow/id/${type_id}.html` + let html = await this.fetch(url, null, this.getHeader()) + if (html != null) { + let $ = load(html) + this.filterObj[type_id] = await this.getFilter($) + } + } + } + } + async setHomeVod() { + let con = await this.fetch(this.siteUrl, null, this.getHeader()); + if (!_.isEmpty(con)) { + const $ = load(con); + this.homeVodList = await this.parseVodShortListFromDoc($) + } + } + + getExtend(value,defaultvalue,key = ""){ + if (value !== undefined && value !== "0"){ + return key + value + }else{ + return defaultvalue + } + + } + + async getCateUrl(tid,pg,extend){ + tid = this.getExtend(extend["1"],tid) + let area = this.getExtend(extend["2"],"","/area/") + let lanuage = this.getExtend(extend["3"],"","/lang/") + let year = this.getExtend(extend["4"],"","/year/") + let letter = this.getExtend(extend["5"],"","/letter/") + let time = this.getExtend(extend['6'],"","/by/") + return this.siteUrl + `/vodshow${time}${area}/id/${tid}${lanuage}${letter}${year}/page/${pg}.html` + } + + async setCategory(tid, pg, filter, extend) { + let reqUrl = await this.getCateUrl(tid,pg,extend) + let html = await this.fetch(reqUrl, null, this.getHeader()) + if (!_.isEmpty(html)) { + let $ = load(html) + this.vodList = await this.parseVodShortListFromDoc($) + let total = Utils.getStrByRegex(/\$\("\.mac_total"\)\.text\('(\d+)'\)/, html) + this.limit = 72; + if (total.length > 0) { + this.total = parseInt(total) + } + if (this.total <= this.limit) { + this.count = 1 + } else { + this.count = Math.ceil(this.total / this.limit) + } + } + } + + async setDetail(id) { + let detailUrl = this.siteUrl + id; + let html = await this.fetch(detailUrl, null, this.getHeader()); + if (!_.isEmpty(html)) { + let $ = load(html) + this.vodDetail = await this.parseVodDetailFromDoc($) + } + } + + + async setPlay(flag, id, flags) { + let html = await this.fetch(this.siteUrl + id,null,this.getHeader()) + if (!_.isEmpty(html)){ + let player_str = Utils.getStrByRegex(/