2

Recently I decided to port a project from using requests to using grequests to make asynchronous HTTP Requests instead for efficiency. One problem I face now is that in my previous code, in cases where there was a redirect I could handle it using the following snippet:

req = requests.get('a domain')
if req.history:
    print req.url # that would be the last domain

In this way I could retrieve the last-visited url after the redirect. So my question is if it's possible to achieve something similar with grequests. Reading the docs I didn't manage to find a possible solution. Thanks in advance!

game0ver
  • 1,250
  • 9
  • 22

0 Answers0