-
Notifications
You must be signed in to change notification settings - Fork 109
Description
When I use the useProxy function I get this error:
TypeError: useProxyPer[target.constructor.name] is not a function
code:
const puppeteer = require('puppeteer');
const useProxy = require('puppeteer-page-proxy');
(async () => {
var proxy = "ip:port:username:password".split(":");
proxy = 'http://'+proxy[2]+':'+proxy[3]+'@'+proxy[0]+':'+proxy[1];
const browser = await puppeteer.launch({
args: ['--disable-web-security'],
executablePath:"C:\Program Files\Google\Chrome\Application\chrome.exe",
headless:false,
});
const page = await browser.newPage();
await useProxy(page, proxy);
await page.goto('https://www.google.com/search?q=what+is+my+ip+address');
await new Promise(reslove => setTimeout(reslove,1000));
await browser.close();
})();
i want help please
NodeJS Version: 20.9.0
npm Version: 10.1.0
package version: 1.3.0
- Note
• i used@lem0-packages/puppeteer-page-proxy
also but showing me that
|TypeError: Cannot read properties of undefined (reading 'get')