我尝试了以下方法:
import grequests
urls = ['http://localhost/test', 'http://localhost/test']
params = {'a':'b', 'c':'d'}
rs = (grequests.post(u, params) for u in urls)
grequests.map(rs)
但它说以下内容:
File "search.py", line 6, in <genexpr>
rs = (grequests.post(u, params) for u in urls)
TypeError: __init__() takes exactly 3 arguments (4 given)
我还需要将响应传递给回调进行处理。