Skip to content

Instantly share code, notes, and snippets.

@KIDJourney
Created April 16, 2018 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KIDJourney/5970a75b1ca01c7c10547864e3d61010 to your computer and use it in GitHub Desktop.
Save KIDJourney/5970a75b1ca01c7c10547864e3d61010 to your computer and use it in GitHub Desktop.
In [1]: import requests
In [2]: resp = requests.get('http://dwz.cn/1C')
In [3]: for i in resp.history:
...: print(i.url)
...:
http://dwz.cn/1C
http://www.google.com
http://www.google.com.hk/url?sa=p&hl=zh-CN&pref=hkredirect&pval=yes&q=http://www.google.com.hk/%3Fgws_rd%3Dcr&ust=1523863173159873&usg=AOvVaw0-XD0UIQhUBeQeEAFHWG6U
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment