Created
May 20, 2013 21:51
-
-
Save ispedals/5615868 to your computer and use it in GitHub Desktop.
Resolves dailymotion video urls
This file contains hidden or 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
| import urllib2 | |
| import re | |
| uid='xv3f6f' | |
| f = urllib2.urlopen('http://www.dailymotion.com/embed/video/%s' % uid).read() | |
| url=re.findall('"stream_h264_url":"(.*?)",', f, re.DOTALL) | |
| resolved_url=url[0].replace('\\','') | |
| print resolved_url |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment