Sign up for Apify Platform here
Star Crawlee on GitHub
Star Crawlee for Python on GitHub
Apify and Crawlee Official Forum
New post
Most posts
Powered by
Hall
Home
Members
John
J
John
Offline
, last seen 4 months ago
Joined August 30, 2024
Contributions
Comments
Replies
J
John
6 months ago
·
APIFY PROXY ECONNREFUSED 127.0.0.1:80
Hello, I'm in trouble with Apify Proxy (on a free plan) I have a connexion refused. With and witout cloudscraper.
Any ideas please?
let proxyConfiguration;
if (useApifyProxy) {
proxyConfiguration = await Actor.createProxyConfiguration({ useApifyProxy: true });
} else if (proxyUrls.length > 0) {
proxyConfiguration = await Actor.createProxyConfiguration({ proxyUrls });
}
console.log(proxyConfiguration, proxyConfiguration.newUrl());
const crawler = new PlaywrightCrawler({
requestQueue,
launchContext: {
launchOptions: {
proxy: proxyConfiguration ? proxyConfiguration.newUrl() : undefined,
},
},
requestHandler: async ({ page, request }) => {
try {
// Use cloudscraper to fetch the page content
const html = await cloudscraper.get({
uri: request.url,
proxy: proxyConfiguration ? proxyConfiguration.newUrl() : undefined,
// Add other cloudscraper options as needed
});
// Process the HTML content as needed
const title = await page.title();
console.log("Page Title: " + title);
(...)
8 comments
M
A
J