We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thank you very much for creating these plugins, they are awesome!
I just have an issue when using "adblocker" and "block-resources" plugins at the same time.
When I use them both I get this error: Request is already handled!
Removing either of the plugins causes the script to work again.
Code Example:
const puppeteer = require('puppeteer-extra'); const pluginProxy = require('puppeteer-extra-plugin-proxy'); const StealthPlugin = require('puppeteer-extra-plugin-stealth'); const RecaptchaPlugin = require('puppeteer-extra-plugin-recaptcha'); const AdblockerPlugin = require('puppeteer-extra-plugin-adblocker'); const blockResourcesPlugin = require('puppeteer-extra-plugin-block-resources'); const mysql = require('mysql'); const fs = require('fs-extra'); const configFile = require('./config'); puppeteer.use(AdblockerPlugin()); puppeteer.use(StealthPlugin()); puppeteer.use(require('puppeteer-extra-plugin-block-resources')({ blockedTypes: new Set(['image', 'font']) })); let puppeteerArgs = [ '--no-sandbox', '--disable-setuid-sandbox', '--enable-features=NetworkService', '--ignore-certifcate-errors', '--ignore-certifcate-errors-spki-list', '--disable-dev-shm-usage', ]; let options = { headless: true, ignoreHTTPSErrors: true, userDataDir: './tmp', args: puppeteerArgs } // Remove data in /tmp directory try { fs.unlink('./tmp/DevToolsActivePort'); fs.removeSync('./tmp/Default'); } catch (e) { console.log('error: ' + e); } puppeteer.launch(options).then(async browser => { try { const page = await browser.newPage(); await page.goto('https://example.com', { timeout: 10000 }); await page.waitForSelector('button#id', { visible: true, timeout: 5000 }); await page.click('button#id'); // Wait await new Promise(r => setTimeout(r, 1500)).catch(() => { console.log('error'); process.exit(); }); await page.solveRecaptchas(); // Wait await new Promise(r => setTimeout(r, 1000)).catch(() => { console.log('error'); process.exit(); }); var result = await page.$eval('span#spanid', element => element.innerHTML); console.log(result); // Clear cache & cookies const client = await page.target().createCDPSession(); await client.send('Network.clearBrowserCookies'); await client.send('Network.clearBrowserCache'); await browser.close(); } catch (e) { console.log('error: ' + e); } finally { await browser.close(); process.exit(); } });
The text was updated successfully, but these errors were encountered:
same, with
puppeteer.use(stealth()); puppeteer.use(require('puppeteer-extra-plugin-adblocker')());
puppeteer.use(stealth());
puppeteer.use(require('puppeteer-extra-plugin-adblocker')());
+-- puppeteer-extra-plugin-adblocker@2.12.0 +-- puppeteer-extra-plugin-stealth@2.9.0 +-- puppeteer-extra@3.2.3 +-- puppeteer-page-proxy@1.2.8 `-- puppeteer@13.0.1
Sorry, something went wrong.
Should be fixed through #592
No branches or pull requests
Thank you very much for creating these plugins, they are awesome!
I just have an issue when using "adblocker" and "block-resources" plugins at the same time.
When I use them both I get this error: Request is already handled!
Removing either of the plugins causes the script to work again.
Code Example:
The text was updated successfully, but these errors were encountered: