1
0
mirror of https://github.com/l1ving/youtube-dl synced 2020-11-18 19:53:54 -08:00

remove ads embedded in json if any (closes #18430)

This commit is contained in:
adirizka7 2018-12-10 02:00:23 +07:00
parent 59c3940165
commit faf7f36b73

View File

@ -38,8 +38,8 @@ class RudoIE(InfoExtractor):
webpage = self._download_webpage(url, video_id, encoding='iso-8859-1')
jwplayer_data = self._parse_json(self._search_regex(
r'(?s)playerInstance\.setup\(({.+?})\)', webpage, 'jwplayer data'), video_id,
jwplayer_data = self._parse_json(re.sub('events: {(.|\n)*},\nabouttext', 'abouttext',
self._search_regex(r'(?s)playerInstance\.setup\(({.+?})\)', webpage, 'jwplayer data')), video_id,
transform_source=lambda s: js_to_json(re.sub(r'encodeURI\([^)]+\)', '""', s)))
info_dict = self._parse_jwplayer_data(