diff --git a/bin/reptile/pufei_net/find.js b/bin/reptile/pufei_net/find.js index 84c3fde..c6c55a5 100644 --- a/bin/reptile/pufei_net/find.js +++ b/bin/reptile/pufei_net/find.js @@ -4,11 +4,14 @@ let mainurl = "http://www.alimanhua.com/" let gethtml = (name) => { return new Promise(async (res, rej) => { puppeteer.launch({ - headless: true, - args: ['--no-sandbox', '--disable-setuid-sandbox'] + headless: false, + args: ['--no-sandbox', '--disable-setuid-sandbox','--blink-settings=imagesEnabled=false'] }).then(async (browser) => { const page = await browser.newPage(); + await page.evaluateOnNewDocument(() => { + Object.defineProperty(navigator, 'webdriver', { get: ()=> false }); + }); try { await page.goto(mainurl); } catch (error) { diff --git a/bin/reptile/taduo_net/find.js b/bin/reptile/taduo_net/find.js index cbc081c..6b2d8f9 100644 --- a/bin/reptile/taduo_net/find.js +++ b/bin/reptile/taduo_net/find.js @@ -5,11 +5,13 @@ let gethtml = (name) => { return new Promise(async (res, rej) => { puppeteer.launch({ headless: true, - args: ['--no-sandbox', '--disable-setuid-sandbox'] + args: ['--no-sandbox', '--disable-setuid-sandbox','--blink-settings=imagesEnabled=false'] }).then(async (browser) => { const page = await browser.newPage(); - + await page.evaluateOnNewDocument(() => { + Object.defineProperty(navigator, 'webdriver', { get: ()=> false }); + }); // await page.goto(mainurl); try { await page.goto(mainurl);