useProxy() : Not working
nikitha12 opened this issue · comments
Hii
I tried using puppeteer-page-proxy and it is not working and i am not getting any error. Here are the details
Node version : v14.3.0
NPM version : v6.14.5
Puppeteer : v5.3.1
Puppeteer Page proxy : v1.2.8
Here is the code I used
const puppeteer = require('puppeteer')
const useProxy = require('puppeteer-page-proxy');
const screenshot = 'booking_results.png'
try {
(async () => {
const browser = await puppeteer.launch({headless: false})
const page = await browser.newPage()
await useProxy(page, 'http://107.173.73.68:60099');
const data = await useProxy.lookup(page);
console.log(data.ip);
await page.authenticate('<username>','<password>')
await page.goto('https://booking.com')
await page.type('#ss', 'Berlin')
await page.click('.sb-searchbox__button')
await page.waitForSelector('#hotellist_inner')
await page.screenshot({ path: screenshot })
const hotels = await page.$$eval('span.sr-hotel__name', anchors => {
return anchors.map(anchor => anchor.textContent.trim()).slice(0, 10)
})
console.log(hotels)
await browser.close()
console.log('See screenshot: ' + screenshot)
})()
} catch (err) {
console.error(err)
}
There is no response or error displayed.
Stuck at : await useProxy(page, 'http://107.173.73.68:60099');
Can you please help out
+1
same issue here
Do you have a way to set up all page IPs? I need to get all page proxies
@nikitha12 were you able to figure this out? I'm having a similar problem.
+1