Created
April 27, 2015 09:30
-
-
Save anonymous/e1c1b2ad6f1abd5362fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Python 3.4.3 (default, Mar 26 2015, 22:03:40) | |
[GCC 4.9.2] on linux | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import requests, re | |
>>> resp = requests.get('http://www.tsdxb.com/links/80031') | |
>>> target_url = re.search("document.location = '([^']*)'", resp.text).group(1) | |
>>> target_url | |
'http://t.yhd.com/?tracker_u=1042102010' | |
>>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment