Update jd_task_newUnique.js

This commit is contained in:
可达鸭 2025-06-23 14:56:39 +08:00
parent 0b6a372c54
commit 422bb4138d

View File

@ -1,5 +1,4 @@
import {Template} from '../../template.js'
import * as cheerio from 'cheerio';
export class Main extends Template {
constructor() {
@ -23,11 +22,8 @@ export class Main extends Template {
user
}
)
let $ = cheerio.load(html);
let scriptTags = $('script').toArray();
let data = []
for (let script of scriptTags) {
let content = $(script).html();
for (let content of this.matchAll(/<script>([^\<]+)<\/script>/g, html)) {
if (content && content.includes('__react_data__')) {
var window = {}
eval(content)