You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rst=[]
size=10
for i in range(98):# 5m 58.8s
if i%size==0:
print(i,i+size)
rs = (grequests.get(u) for u in urls[i:i+size])
rst.extend(grequests.map(rs))
But, if use size in map, 20minusts ago, no output, I killed it:
rs = (grequests.get(u) for u in urls)
rst=grequests.map(rs,size=10)
Why?
And how to speed it, thanks!
The text was updated successfully, but these errors were encountered:
The behavior you're seeing is probably because one or more of your requests is hanging. Add the timeout keyword argument the request to be sure one request does not hang up your entire request list.
Can't reproduce this using httpbin.org -- must be a reliability problem with the server you're contacting.
In my own testing, map(rs, size=10) is significantly faster.
I split the urls myself,cost about 6 minutes,
But, if use size in map, 20minusts ago, no output, I killed it:
Why?
And how to speed it, thanks!
The text was updated successfully, but these errors were encountered: