]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[aenetworks] Add more video URL regexes (closes #12657)
authorSergey M․ <dstftw@gmail.com>
Wed, 5 Apr 2017 19:28:09 +0000 (02:28 +0700)
committerSergey M․ <dstftw@gmail.com>
Wed, 5 Apr 2017 19:36:48 +0000 (02:36 +0700)
youtube_dl/extractor/aenetworks.py

index dd96a47cecd787de1dd3b071fd5dd49f7306560f..9a50740371a29a311506c37c585c87d393196f14 100644 (file)
@@ -107,7 +107,10 @@ class AENetworksIE(AENetworksBaseIE):
         }
         video_id = self._html_search_meta('aetn:VideoID', webpage)
         media_url = self._search_regex(
-            r"media_url\s*=\s*'([^']+)'", webpage, 'video url')
+            [r"media_url\s*=\s*'(?P<url>[^']+)'",
+             r'data-media-url=(?P<url>(?:https?:)?//[^\s>]+)',
+             r'data-media-url=(["\'])(?P<url>(?:(?!\1).)+?)\1'],
+            webpage, 'video url', group='url')
         theplatform_metadata = self._download_theplatform_metadata(self._search_regex(
             r'https?://link.theplatform.com/s/([^?]+)', media_url, 'theplatform_path'), video_id)
         info = self._parse_theplatform_metadata(theplatform_metadata)