6

How would I accomplish the following:

rs = (self.exporter.grequester(url) for url in url_chunk)
res_items = grequests.map(rs, timeout=10s) # this is the item that times out
David542
  • 104,438
  • 178
  • 489
  • 842

1 Answers1

8

Try this:

reqs = grequests.map(grequests.get(link, headers=header,  timeout=1) for link in links)

source

AMACB
  • 1,290
  • 2
  • 18
  • 26
Natan
  • 126
  • 1
  • 8