Avatar ·

Asynchronous HTTP calls Grequets

📁 асинхронность, python, помощь, пример, requests

always used the Request library. But how I can’t change my memory there, you can send a request to only 1 http url and only then to another, in tu. Grequests as it is written can be sent simultaneously at least 10 url asynchronism. But I don’t know how to do it, I have already tried it. The file has approximately 150 URLs. Code:

   import  makerssimplese =  'http://shost-craft.su'    with   open  ( "" C: \\ Cruelnetwork \\ Cruel.need \\ wolfs.txt "" )  as  werewolves:  array = [row.strip ()+simplesite  for  row  in  werewolves] params = { '' a 'a'  '' b ',  'c' :  'd' } rs = (Grequests.post (u, data = params)  for  u  in  in  map  (RS)   print  (RS)     

I waited for about a minute, I understand it for a very long time. And I don’t know how to solve this problem. Or is it just the same fast? At the end, it was displayed on the screen: & lt; Generator Object & Lt; Genexpr & GT; AT 0x0000029AD8D29A98 & GT; I want a request to 10 URL addresses immediately, not in tu, but immediately for 10 addresses. Or can not be implemented using this library?