Python 如何设置grequests超时

Python 如何设置grequests超时,python,grequests,Python,Grequests,我将如何实现以下目标: rs = (self.exporter.grequester(url) for url in url_chunk) res_items = grequests.map(rs, timeout=10s) # this is the item that times out 试试这个: reqs = grequests.map(grequests.get(link, headers=header, timeout=1) for link in links) 在请求中,调用

我将如何实现以下目标:

rs = (self.exporter.grequester(url) for url in url_chunk)
res_items = grequests.map(rs, timeout=10s) # this is the item that times out
试试这个:

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

在请求中,调用类似于requests.get(URL,timeout=(3,10)),因此请尝试在10秒内去掉's'