Cuadrix / puppeteer-page-proxy

Additional module to use with 'puppeteer' for setting proxies per page basis.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I'VE FIXED ALL THE BUGS / ERRORS.

Pudochu opened this issue · comments

I fixed all the bugs on ‘src\core\proxy.js’.

Here: Pudochu@30bfe18

If you encounter some bugs, let me know here - I will fix them.

Load page...
Unhandled Rejection at: TypeError: No proxy handler found for target type: CdpHTTPRequest
at useProxy (/root/Twitch/node_modules/puppeteer-page-proxy/src/core/proxy.js:87:19)
at /root/Twitch/start.js:266:9
at /root/Twitch/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Page.js:238:32
at async CdpHTTPRequest.finalizeInterceptions (/root/Twitch/node_modules/puppeteer-core/lib/cjs/puppeteer/api/HTTPRequest.js:147:9)

If you encounter some bugs, let me know here - I will fix them.

Load page... Unhandled Rejection at: TypeError: No proxy handler found for target type: CdpHTTPRequest at useProxy (/root/Twitch/node_modules/puppeteer-page-proxy/src/core/proxy.js:87:19) at /root/Twitch/start.js:266:9 at /root/Twitch/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Page.js:238:32 at async CdpHTTPRequest.finalizeInterceptions (/root/Twitch/node_modules/puppeteer-core/lib/cjs/puppeteer/api/HTTPRequest.js:147:9)

If you encounter some bugs, let me know here - I will fix them.

use : npm i @lem0-packages/puppeteer-page-proxy

const puppeteer = require('puppeteer');
const useProxy = require("@lem0-packages/puppeteer-page-proxy");
(async () => {
  const browser = await puppeteer.launch({
    headless: false,
  });

  const page = await browser.newPage();

  await page.setRequestInterception(true);
  page.on('request', async (request) => {
      await useProxy(request, 'http://TYPE_YOUR@PROXY_HERE:8000');
  });
  
  await page.goto('https://ipinfo.io');
})();