crawlee icon indicating copy to clipboard operation
crawlee copied to clipboard

accept Map / Set in RequestList sources

Open pocesar opened this issue 5 years ago • 1 comments

For Set, would iterate over it. For Map, would only use the values().

Since RequestList clears the sources, when doing openRequestList('rl', [...set]), it does only on the array, having to manually use set.clear() after.

pocesar avatar Mar 08 '20 22:03 pocesar

PR welcome :) Although I'm not entirely sure how happy Sets and Maps are if you delete items from them while iterating so it might be a bit tricky. Or not...

mnmkng avatar Mar 09 '20 08:03 mnmkng

Closing as stale, the preferred way is now crawler.addRequests() which handles batching and is non-blocking.

B4nan avatar Jul 17 '23 15:07 B4nan