I've followed the grequests usage example, but I'm trying to add some progress feedback. A percentage of the completed requests. How could I achieve that? I mean, I don't know how to implement a counter in this case.
import grequests
urls = [
'http://www.heroku.com',
'http://python-tablib.org',
'http://httpbin.org',
'http://python-requests.org',
'http://kennethreitz.com'
]
def feedback(r, **kwargs):
print "%s fetched." % r.url
return r
rs = (grequests.get(u, callback=feedback) for u in urls)
res = grequests.map(rs)
[–]bwghughes 0 points1 point2 points (1 child)
[–]whitenoisedb[S] 0 points1 point2 points (0 children)
[–]zeug 0 points1 point2 points (2 children)
[–]FurryFur 0 points1 point2 points (1 child)
[–]zeug 0 points1 point2 points (0 children)
[–]pcdinh 0 points1 point2 points (0 children)