/* * @File : doll.js * @Author : jade * @Date : 2024/1/4 14:15 * @Email : jadehh@1ive.com * @Software : Samples * @Desc : doll */ import {Spider} from "./spider.js"; import {Crypto, load} from "../lib/cat.js"; import {VodDetail, VodShort} from "../lib/vod.js"; import * as Utils from "../lib/utils.js"; class Doll extends Spider { constructor() { super(); this.siteUrl = "https://hongkongdollvideo.com" } getName() { return "🔞┃玩偶姐姐┃🔞" } getAppName() { return "玩偶姐姐" } getJSName() { return "doll" } getType() { return 3 } async parseVodShortListFromDoc($) { let vod_list = [] let vodElements = $("[class=\"row\"]").find("[class=\"video-detail\"]") for (const vodElement of vodElements) { let vodShort = new VodShort() vodShort.vod_id = $(vodElement).find("a")[0].attribs["href"] let videoInfoElements = $($(vodElement).find("[class=\"video-info\"]")).find("a") vodShort.vod_name = videoInfoElements[0].attribs["title"] vodShort.vod_remarks = $(videoInfoElements[1]).text() vodShort.vod_pic = $(vodElement).find("img")[0].attribs["data-src"] vod_list.push(vodShort) } return vod_list } async parseVodDetailFromDoc($, key) { let vodDetail = new VodDetail() let vodElement = $("[class=\"container-fluid\"]") vodDetail.vod_name = $($(vodElement).find("[class=\"page-title\"]")[0]).text() vodDetail.vod_remarks = $(vodElement).find("[class=\"tag my-1 text-center\"]")[0].attribs["href"].replaceAll("/", "") vodDetail.vod_pic = $(vodElement).find("video")[0].attribs["poster"] let html = $.html() let voteTag = Utils.getStrByRegex(/var voteTag="(.*?)";/g, html) let videoInfo = JSON.parse(Utils.getStrByRegex(/