Skip to content

Instantly share code, notes, and snippets.

@ispedals
Created May 20, 2013 21:51
Show Gist options
  • Select an option

  • Save ispedals/5615868 to your computer and use it in GitHub Desktop.

Select an option

Save ispedals/5615868 to your computer and use it in GitHub Desktop.
Resolves dailymotion video urls
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