]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[bloomberg] Improve video id regex
authorSergey M․ <dstftw@gmail.com>
Sat, 28 Nov 2015 16:41:39 +0000 (22:41 +0600)
committerSergey M․ <dstftw@gmail.com>
Sat, 28 Nov 2015 16:41:39 +0000 (22:41 +0600)
youtube_dl/extractor/bloomberg.py

index b6197d3f13fe8e6e4d5f38b201285baa5c8c4b8c..c28ed0c7978dfc1cea7e0596918d1727e3a43b24 100644 (file)
@@ -28,7 +28,9 @@ class BloombergIE(InfoExtractor):
     def _real_extract(self, url):
         name = self._match_id(url)
         webpage = self._download_webpage(url, name)
-        video_id = self._search_regex(r'"bmmrId":"(.+?)"', webpage, 'id')
+        video_id = self._search_regex(
+            r'["\']bmmrId["\']\s*:\s*(["\'])(?P<url>.+?)\1',
+            webpage, 'id', group='url')
         title = re.sub(': Video$', '', self._og_search_title(webpage))
 
         embed_info = self._download_json(