Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以我知道您可以使用grequests创建多个请求并map同时处理它们。但是,当一些发送的请求尚未返回响应时,您如何即时创建一些请求?我不想使用多处理或多线程,有没有办法使用 grequests 来实现它?
grequests
map
只需为此使用常规请求库。无论如何,调用res = requests.get(...)都是异步的,它不会阻塞,直到你调用“res.content”之类的东西。这是你想要的?
res = requests.get(...)