|
| 1 | +const {getHtml} = $.require('./_lib.request.js') |
| 2 | +const { |
| 3 | + formatPlayUrl, |
| 4 | +} = misc; |
| 5 | +var rule = { |
| 6 | + title: '玩偶哥哥[盘]', |
| 7 | + host: 'https://www.wogg.net', |
| 8 | + //url: '/index.php/vod/show/id/fyclass/page/fypage.html', |
| 9 | + url: '/vodshow/fyclass-fyfilter.html', |
| 10 | + filter_url: '{{fl.area}}-{{fl.by or "time"}}-{{fl.class}}-----fypage---{{fl.year}}', |
| 11 | + searchUrl: '/vodsearch/**--------fypage---.html', |
| 12 | + filter: 'H4sIAAAAAAAAA+2aW08bRxTHv0rlZx5mISFpvkqVBzey1KhpKkFaCUVIgDHY5mKDCMS1wdzMrdgY7BCzju0vszO7/hZdPOcyTputlaCqD/PG75w9M/Of3TlnZsx3b2NO7NkPb2M/J2Ziz2IvXsWnp2NjsdfxXxIhysypSqZC/j3+6rfE4LnX9+bUWT95dm8OITY7BtbtUvg8WAHQ56evoSEG9Kn5vJrbBh8AtZk98zolbFMDtXm6Ie/a2KYGiqOBM1B/6feem8H+NKAvqJ7I1QvwAVB/2Su/gz4AY5z+VpvHeQ/kqyzzOAFoLNUTr7uPY9FAcUub/cI5xmmguL2LcOQYp2GU+VQLl/72Bvo0kC+ZVQt/oE8DaW/nZKqF2jWgr7+7qd5XwAdAbW4vBxkX29RA+ro1f+uD7FyjRGJ6InccHNFb1EC+9SWZu0GfBnqLvXz4DvAtauBZLandDZrVAZBvsef/iUoAaAY6G367NDTgIdPs8/sn9SqKTyXixiIq1eWqO+Ii8lpVWezI49N+YQl8Q6bh5/onBdW6GnoOTJ+1l6uru+5we9pE8rrroRGFaaDprPT8XNXPFHBGiek1N95xNABFr1yzD4DidiqqdIlxGuizKp9zHAD3Vzf7q5s+2f3IPgDyrdWle4I+DdTmYi6cY5nGFcfMi3xfrfRCI61zZHoideu1cekBmB/GTCI+xR+G2rnt7zRH/DDGxfgjsA3+NOwTbJ8w7eNsHzftDtsd0y7YLgy78z3Zwz8N+1O2PzXtT9j+xLRPsn3StD9m+2PTznodU6/Deh1Tr8N6HVOvw3odU6/Deh1Tr2C9wtQrWK8w9QrWK0y9gvUKU69gvcLUK1ivMPUK1itMvYL1ClOvYL3C1CtYb/in+Vn+OGN8lOub0s397aPkbzWENy/DRynDuK6qb4Hnp5dvpnnlXy3KNGax6Re/TiXue30+Fht/oB2HX67yjgOAlmKx47mnxoZkwJxdBmmS3SGobuOzmibnb2UyN1TZwDTKnkfWbqVbRZ+GEfcSX9zzRO0lovY8UdUyqrZ7dwdcLQF4v5BSBSw+ANTfuyXenwAYldR4axpGTaC2strKaiurray2sv5zZX30QJW1P5fxT+cwRWgw8/5i2cj7IdDAar2gnsaUpIHiNqsqi6crAE5XKdXCGgTA6arh3eUpXQ3ASK79IxwLAPncC1nbQ58G6q94Y5xLNVDcVlk16V5BA8W1Wiqd89xNPl8OmWgemodhJcV50EBtXC8E86sYreEraxw7v77SfVsF+8/qk831NtfbXG/m+okHyvVR+TzqjtVPVoMDrBEA1Ob6mZ/HQQOQL7/nX9IdpAba5kXceQb53WAd720BqM39A1nEsxbAKOcpVXKNe1QN1F/ELWLUHbKsh9OELxnA9FUahq/CZ07/uOt9wvtXAD6/lWW6iHEa+NO5kVWsjwDUZjGrClggAHhermVvh+ZlAP+jc1hUhYg8U0VUnW87b9kziK1Lti79a12afKjbva2P/UOsEwC0FCsN9gHQ9jHZka0F3D5q4DZLsrZPbQ6A2rxreu0jbFMDxZ33gtssxmmguIhfqcJ0zHdyAKzhy3d5QX5V1nap1g2A9C2vhacS1KdhlPrZn1sKDrFGAlB/hbyaX8H+NFBcpsljAaD+jte89jL2p4G092peGzMtgE2XNl3adDl8ZfNQdzb2/y94nPb/L6BN+/8X9lci+yuR3XLYLYfdcsCWY/YvHu9OoPQpAAA=', |
| 13 | + cate_exclude: '网址|专题|全部影片', |
| 14 | + // tab_rename: {'KUAKE1': '夸克1', 'KUAKE11': '夸克2', 'YOUSEE1': 'UC1', 'YOUSEE11': 'UC2',}, |
| 15 | + play_parse: true, |
| 16 | + searchable: 1, |
| 17 | + filterable: 1, |
| 18 | + quickSearch: 0, |
| 19 | + class_parse: async () => { |
| 20 | + let classes = [{ |
| 21 | + type_id: '1', |
| 22 | + type_name: '玩偶电影', |
| 23 | + }, { |
| 24 | + type_id: '2', |
| 25 | + type_name: '玩偶剧集', |
| 26 | + }, { |
| 27 | + type_id: '44', |
| 28 | + type_name: '臻彩视界', |
| 29 | + }, { |
| 30 | + type_id: '6', |
| 31 | + type_name: '玩偶短剧', |
| 32 | + }, { |
| 33 | + type_id: '3', |
| 34 | + type_name: '玩偶动漫', |
| 35 | + }, { |
| 36 | + type_id: '4', |
| 37 | + type_name: '玩偶综艺', |
| 38 | + }, { |
| 39 | + type_id: '5', |
| 40 | + type_name: '玩偶音乐', |
| 41 | + }]; |
| 42 | + return { |
| 43 | + class: classes, |
| 44 | + } |
| 45 | + }, |
| 46 | + 预处理: async () => { |
| 47 | + return [] |
| 48 | + }, |
| 49 | + 推荐: async () => { |
| 50 | + return [] |
| 51 | + }, |
| 52 | + 一级: async function (tid, pg, filter, extend) { |
| 53 | + let {MY_CATE, input} = this; |
| 54 | + let html = (await getHtml(input)).data |
| 55 | + const $ = pq(html) |
| 56 | + let videos = [] |
| 57 | + $('.module-items .module-item').each((index, item) => { |
| 58 | + const a = $(item).find('a:first')[0]; |
| 59 | + const img = $(item).find('img:first')[0]; |
| 60 | + const content = $(item).find('.video-text:first').text(); |
| 61 | + videos.push({ |
| 62 | + "vod_name": a.attribs.title, |
| 63 | + "vod_id": a.attribs.href, |
| 64 | + "vod_remarks": content, |
| 65 | + "vod_pic": img.attribs['data-src'] |
| 66 | + }) |
| 67 | + }) |
| 68 | + return videos |
| 69 | + }, |
| 70 | + 二级: async function (ids) { |
| 71 | + let {input} = this; |
| 72 | + let html = (await getHtml(input)).data |
| 73 | + const $ = pq(html) |
| 74 | + let vod = { |
| 75 | + "vod_name": $('h1.page-title').text(), |
| 76 | + "vod_id": input, |
| 77 | + "vod_remarks": $('.video-info-item').text(), |
| 78 | + "vod_pic": $('.lazyload').attr('data-src'), |
| 79 | + "vod_content": $('p.sqjj_a').text(), |
| 80 | + } |
| 81 | + let playform = [] |
| 82 | + let playurls = [] |
| 83 | + for (const item of $('.module-row-title')) { |
| 84 | + const a = $(item).find('p:first')[0]; |
| 85 | + let link = a.children[0].data.trim() |
| 86 | + if (/drive.uc.cn/.test(link)) { |
| 87 | + const shareData = UC.getShareData(link); |
| 88 | + if (shareData) { |
| 89 | + const videos = await UC.getFilesByShareUrl(shareData); |
| 90 | + if (videos.length > 0) { |
| 91 | + playform.push('UC-' + shareData.shareId); |
| 92 | + playurls.push(videos.map((v) => { |
| 93 | + const list = [shareData.shareId, v.stoken, v.fid, v.share_fid_token, v.subtitle ? v.subtitle.fid : '', v.subtitle ? v.subtitle.share_fid_token : '']; |
| 94 | + return v.file_name + '$' + list.join('*'); |
| 95 | + }).join('#')) |
| 96 | + } else { |
| 97 | + playform.push('UC-' + shareData.shareId); |
| 98 | + playurls.push("资源已经失效,请访问其他资源") |
| 99 | + } |
| 100 | + } |
| 101 | + } |
| 102 | + if (/pan.quark.cn/.test(link)) { |
| 103 | + const shareData = Quark.getShareData(link); |
| 104 | + if (shareData) { |
| 105 | + const videos = await Quark.getFilesByShareUrl(shareData); |
| 106 | + if (videos.length > 0) { |
| 107 | + playform.push('Quark-' + shareData.shareId); |
| 108 | + playurls.push(videos.map((v) => { |
| 109 | + const list = [shareData.shareId, v.stoken, v.fid, v.share_fid_token, v.subtitle ? v.subtitle.fid : '', v.subtitle ? v.subtitle.share_fid_token : '']; |
| 110 | + return v.file_name + '$' + list.join('*'); |
| 111 | + }).join('#')) |
| 112 | + } else { |
| 113 | + playform.push('Quark-' + shareData.shareId); |
| 114 | + playurls.push("资源已经失效,请访问其他资源") |
| 115 | + } |
| 116 | + } |
| 117 | + } |
| 118 | + } |
| 119 | + vod.vod_play_from = playform.join("$$$") |
| 120 | + vod.vod_play_url = playurls.join("$$$") |
| 121 | + return vod |
| 122 | + }, |
| 123 | + 搜索: async function (wd, quick, pg) { |
| 124 | + let {input} = this |
| 125 | + let html = (await getHtml(input)).data |
| 126 | + const $ = pq(html) |
| 127 | + let videos = [] |
| 128 | + $('.module-items .module-search-item').each((index, item) => { |
| 129 | + const a = $(item).find('a:first')[0]; |
| 130 | + const img = $(item).find('img:first')[0]; |
| 131 | + const content = $(item).find('.video-text:first').text(); |
| 132 | + videos.push({ |
| 133 | + "vod_name": a.attribs.title, |
| 134 | + "vod_id": a.attribs.href, |
| 135 | + "vod_remarks": content, |
| 136 | + "vod_pic": img.attribs['data-src'] |
| 137 | + }) |
| 138 | + }) |
| 139 | + return videos |
| 140 | + }, |
| 141 | + lazy: async function (flag, id, flags) { |
| 142 | + let {input} = this; |
| 143 | + const ids = input.split('*'); |
| 144 | + const urls = []; |
| 145 | + let UCDownloadingCache = {}; |
| 146 | + let UCTranscodingCache = {}; |
| 147 | + if (flag.startsWith('Quark-')) { |
| 148 | + console.log("夸克网盘解析开始") |
| 149 | + const down = await Quark.getDownload(ids[0], ids[1], ids[2], ids[3], true); |
| 150 | + urls.push("原画", down.download_url + '#fastPlayMode##threads=10#') |
| 151 | + const transcoding = (await Quark.getLiveTranscoding(ids[0], ids[1], ids[2], ids[3])).filter((t) => t.accessable); |
| 152 | + transcoding.forEach((t) => { |
| 153 | + urls.push(t.resolution === 'low' ? "流畅" : t.resolution === 'high' ? "高清" : t.resolution === 'super' ? "超清" : t.resolution, t.video_info.url) |
| 154 | + }); |
| 155 | + return { |
| 156 | + parse: 0, |
| 157 | + url: urls, |
| 158 | + header: { |
| 159 | + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36', |
| 160 | + 'origin': 'https://pan.quark.cn', |
| 161 | + 'referer': 'https://pan.quark.cn/', |
| 162 | + 'Cookie': Quark.cookie |
| 163 | + } |
| 164 | + } |
| 165 | + } else if (flag.startsWith('UC-')) { |
| 166 | + console.log("UC网盘解析开始") |
| 167 | + if (!UCDownloadingCache[ids[1]]) { |
| 168 | + const down = await UC.getDownload(ids[0], ids[1], ids[2], ids[3], true); |
| 169 | + if (down) UCDownloadingCache[ids[1]] = down; |
| 170 | + } |
| 171 | + downUrl = UCDownloadingCache[ids[1]].download_url; |
| 172 | + urls.push("UC原画", downUrl); |
| 173 | + return { |
| 174 | + parse: 0, |
| 175 | + url: urls, |
| 176 | + header: { |
| 177 | + "Referer": "https://drive.uc.cn/", |
| 178 | + "cookie": UC.cookie, |
| 179 | + "User-Agent": 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) quark-cloud-drive/2.5.20 Chrome/100.0.4896.160 Electron/18.3.5.4-b478491100 Safari/537.36 Channel/pckk_other_ch' |
| 180 | + }, |
| 181 | + } |
| 182 | + } |
| 183 | + }, |
| 184 | +} |
0 commit comments