def _get_media_url(cls, url): '''Returns the the media url for a given stagevu video URL or None.''' #print url match = re.search(r'<param name="src" value="(.+?)"', _download(url)) if match: return ('%s' % match.group(1)) return None
def _get_media_url(cls, url): print url '''Returns the the media url for a given google video URL or None.''' flvurl_match = re.search(r'preview_url:\'(.+?)\'', _download(url)) if not flvurl_match: return None flvurl = _unhex(flvurl_match.group(1)) params = parse_qs(flvurl.split('?', 1)[1]) return urllib.unquote_plus(params['videoUrl'][0])
def _get_media_url(cls, url): """Returns the the media url for a given veehd video URL or None.""" # print url match = re.search(r'(/vpi\?h=.+?do=s.+?)"', _download(url)) if match: match2 = "http://veehd.com" + match.group(1) # print match2 src2 = _download(match2) # print src2 for _, ptn in cls._patterns: match = ptn.search(src2) if match: return "%s" % match.group(1) # else: # print str(ptn) + ' Match not found.' """newmatch = re.search(r'<embed type="video/divx" src="([^&"]+)"', _download(match2)) if newmatch: return ('%s' % newmatch.group(1))""" return None
def _get_media_url(cls, url): '''Returns the the media url for a given natgeo video URL or None.''' #print url link = _download(url) content = re.compile('content="([^"]+)"').findall(link) if content: content = content[0] else: return None src = re.compile('src="([^"]+)"').findall(link) if src: src = src[0] else: return None return content + src