fix: tricks applied by puppeteer-extra-plugin-stealth

This commit is contained in:
Yanlong Wang 2024-11-18 16:43:40 +08:00
parent 1f4620deef
commit 4400bef95b
No known key found for this signature in database
GPG Key ID: C0A623C0BADF9F37

View File

@ -221,8 +221,14 @@ const MUTATION_IDLE_WATCH = `
})();
`;
const DONT_MESS_WITH_THE_FUNDAMENTALS = `
delete Function.prototype.toString;
delete Function.prototype.bind.apply;
delete Function.prototype.bind.call;
`;
const SCRIPT_TO_INJECT_INTO_FRAME = `
${DONT_MESS_WITH_THE_FUNDAMENTALS}
${READABILITY_JS}
${SIMULATE_SCROLL}
${MUTATION_IDLE_WATCH}