Skip to content

Commit cc12853

Browse files
committed
fix: remove script content
1 parent 89a0815 commit cc12853

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

lib/www.po18.tw.t.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { get } from "node:http";
22
import { readline } from "../exe.ts";
33
import { fetch2, getDocument, getSiteCookie, openFile, processContent, setRawCookie } from "../main.ts";
44

5+
console.log('po18的付费很有特色,我们将把所有能免费观看的全部下载');
6+
57
async function showCaptcha(caUrl: string, refer?: string) {
68
const caRes = await fetch2(caUrl, {
79
headers: {

lib/www.uaa.com.t.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ export default {
119119
return;
120120
}
121121

122+
// 去除script
123+
const ctxel = document.querySelector(this.content);
124+
ctxel?.getElementsByTagName('div').filter(e => e.getAttribute('style')?.includes('none')).forEach(e => e.remove());
125+
filled_data.content = processContent(ctxel, {}, new URL(filled_data.url));
126+
122127
if(filled_data.content?.includes('以下正文内容已隐藏')){
123128
filled_data.content = filled_data.content.split('…………………………')[0].trim();
124129

@@ -148,6 +153,7 @@ export default {
148153
// 探测
149154
if(code == '3'){
150155
console.log('你似乎用完了免费额度,请充值后再试');
156+
filled_data.content = ''; // prevent retry
151157
}
152158

153159
if(code == '4'){

0 commit comments

Comments
 (0)