[gameinformer] Fix brightcove id extraction
authorPeter Pitzulo <pongopeter826@gmail.com>
Wed, 7 Feb 2018 14:40:48 +0000 (09:40 -0500)
committerSergey M <dstftw@gmail.com>
Wed, 7 Feb 2018 14:40:48 +0000 (21:40 +0700)
youtube_dl/extractor/gameinformer.py

index a66e309de6993210052d09c4107fe26a168f1b33..239c1961d59865fdb44cafaeae049a9420921570 100644 (file)
@@ -24,5 +24,10 @@ class GameInformerIE(InfoExtractor):
     def _real_extract(self, url):
         display_id = self._match_id(url)
         webpage = self._download_webpage(url, display_id)
-        brightcove_id = self._search_regex(r"getVideo\('[^']+video_id=(\d+)", webpage, 'brightcove id')
-        return self.url_result(self.BRIGHTCOVE_URL_TEMPLATE % brightcove_id, 'BrightcoveNew', brightcove_id)
+        brightcove_id = self._search_regex(
+            [r'<[^>]+\bid=["\']bc_(\d+)', r"getVideo\('[^']+video_id=(\d+)"],
+            webpage, 'brightcove id')
+        return self.url_result(
+            self.BRIGHTCOVE_URL_TEMPLATE % brightcove_id, 'BrightcoveNew',
+            brightcove_id)
+