0
>>> payload = {'a': 'b'}
>>> url = 'http://someurl/'
>>> req_ = [grequests.post(url, session=requests.session, data=payload)]
>>> r = grequests.map(req_)
>>> r
[None]

难道我做错了什么?

4

1 回答 1

1

您需要传递会话实例而不是会话类:

>>> session = requests.session()
>>> req_ = [grequests.post(url, session=session, data=payload)]
于 2017-07-21T13:58:56.000 回答