#Configure Apify Proxy urls in a Crawlee Playwright crawler

1 messages · Page 1 of 1 (latest)

lavish bluff
#

I've been trying to use Apify proxies in my Crawlee crawler, but have had no luck with it, always getting an net::ERR_TUNNEL_CONNECTION_FAILED error. Evidently I'm doing something wrong, but the documentation has been extremely unhelpful, and it's been very hard to find tutorials on the matter. The relevant sections of code are as follows:

import {
  PlaywrightCrawler,
  ProxyConfiguration,
} from 'crawlee';

const proxyUrls = [
  `http://groups-BUYPROXIES94952:${this.apifyToken}@proxy.apify.com:8000`,
  `http://groups-RESIDENTIAL:${this.apifyToken}@proxy.apify.com:8000`,
];

const crawler = new PlaywrightCrawler({
  requestHandler: router,
  maxConcurrency: 10,
  navigationTimeoutSecs: 180,
  requestHandlerTimeoutSecs: 180,
  proxyConfiguration: new ProxyConfiguration({
    proxyUrls,
  }),
});

I really need some help with this. Thanks in advance.

polar herald
#

what is apify token? you need to use apify proxy token

onyx river
#

Maybe try to change proxyUrls to proxyUrls: proxyUrls

lavish bluff
polar herald
lavish bluff
#

Well, then that's where the issue lies, haha. I'll change my plan and try again, thanks.