[brightcove] Improve the 'experienceJSON' regex (#3081)

One of the strings may contain ';', we would get an invalid json string.
pull/8/head
Jaime Marquínez Ferrándiz 2014-06-15 11:08:24 +02:00
rodzic 36755d40b4
commit a013eba65f
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -187,7 +187,7 @@ class BrightcoveIE(InfoExtractor):
webpage = self._download_webpage(req, video_id)
self.report_extraction(video_id)
info = self._search_regex(r'var experienceJSON = ({.*?});', webpage, 'json')
info = self._search_regex(r'var experienceJSON = ({.*});', webpage, 'json')
info = json.loads(info)['data']
video_info = info['programmedContent']['videoPlayer']['mediaDTO']
video_info['_youtubedl_adServerURL'] = info.get('adServerURL')