You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note
• i used @lem0-packages/puppeteer-page-proxy also but showing me that
| TypeError: Cannot read properties of undefined (reading 'get')
You can create a CdpHTTPRequest in useProxyPer with the same code as HTTPRequest
constuseProxyPer={
...
CdpHTTPRequest: async(request,data)=>{letproxy,overrides;// Separate proxy and overridesif(type(data)==="object"){if(Object.keys(data).length!==0){proxy=data.proxy;deletedata.proxy;overrides=data;}}else{proxy=data}// Skip request if proxy omittedif(proxy){awaitrequestHandler(request,proxy,overrides)}else{request.continue(overrides)}}...}
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
• i used
@lem0-packages/puppeteer-page-proxy
also but showing me that|
TypeError: Cannot read properties of undefined (reading 'get')
The text was updated successfully, but these errors were encountered: