Apify and Crawlee Official Forum

Home
Members
Naimish
N
Naimish
Offline, last seen 3 months ago
Joined September 10, 2024
I have used this code.
which is provided onsite for example.
Plain Text
// Import the JavaScript SDK into your project
import { Actor } from 'apify';

await Actor.init();
// ...

const queue = await Actor.openRequestQueue();

// Enqueue requests
await queue.addRequests([{ url: 'http://example.com/aaa' }]);
await queue.addRequests(['http://example.com/foo', 'http://example.com/bar'], {
    forefront: true,
});

// Get the next request from queue
const request1 = await queue.fetchNextRequest();
const request2 = await queue.fetchNextRequest();

// Get a specific request
const specificRequest = await queue.getRequest('shi6Nh3bfs3');

// Reclaim a failed request back to the queue
// and process it again
await queue.reclaimRequest(request2);

// Remove a queue
await queue.drop();

// ...
await Actor.exit();


I am getting this error.
1 comment
O
I'm taking an input file from the user through the UI and processing each URL, writing the results into a dataset. However, some URLs might fail during processing, and I want to provide a list of those failed URLs. How can I achieve this in an Apify actor using Python?
3 comments
A
N