Log Proxy IP

Hey, i am using crawlee, playwright crawler with oxylabs residential prox. how can i print the actuallIP address that crawlee used for a specific requets? I know the crawling context gives you access to a proxyInfo object but it only shows the proxy url and not the IP chosen for the request. Which is not very useful to me. I have configured the proxy like this: const proxyConfiguration = new ProxyConfiguration({ proxyUrls: [http://${proxyUsername}:${proxyPassword}@${proxyAddress}], }); and im my requestHandler if i do console.log(proxyInfo) I only get username, portnumber, hostaname etc, basically the stuff i already know. But not the actual IP chosen for that request. How can i do this?
2 Replies
other-emerald
other-emerald•2y ago
I don't think this info is avaiable anywhere by default, so you would have to add another call to e.g. https://api.apify.com/v2/browser-info?skipHeaders=1 . You could use e.g. sendRequest() to do it - https://crawlee.dev/api/playwright-crawler/interface/PlaywrightCrawlingContext#sendRequest
extended-salmon
extended-salmonOP•2y ago
Ahh, okay i see. Thanks Andrey 💯

Did you find this page helpful?