]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
Modified m_urls regex and video_url
authorpishposhmcgee <pishposh.mcgee@gmail.com>
Mon, 29 Jul 2013 20:45:20 +0000 (15:45 -0500)
committerpishposhmcgee <pishposh.mcgee@gmail.com>
Mon, 29 Jul 2013 20:45:20 +0000 (15:45 -0500)
Some videos have a leading slash, some do not

youtube_dl/extractor/vevo.py

index 3b16dcfbc160b34c787d7dd99e9b54fb2dea1c6b..67537eae5afecc158c13864c4dc494fd366076c3 100644 (file)
@@ -35,12 +35,12 @@ class VevoIE(InfoExtractor):
 
         self.report_extraction(video_id)
         video_info = json.loads(info_json)
-        m_urls = list(re.finditer(r'<video src="(?P<ext>.*?):(?P<url>.*?)"', links_webpage))
+        m_urls = list(re.finditer(r'<video src="(?P<ext>.*?):/?(?P<url>.*?)"', links_webpage))
         if m_urls is None or len(m_urls) == 0:
             raise ExtractorError(u'Unable to extract video url')
         # They are sorted from worst to best quality
         m_url = m_urls[-1]
-        video_url = base_url + m_url.group('url')
+        video_url = base_url + '/' + m_url.group('url')
         ext = m_url.group('ext')
 
         return {'url': video_url,