1
0
Fork 0
mirror of https://gitlab.com/dstftw/youtube-dl.git synced 2020-11-16 09:42:26 +00:00

[funimation] Fix promotional videos extraction

This commit is contained in:
Sergey M․ 2015-12-12 00:48:09 +06:00
parent b091529a3c
commit f208e52a76

View file

@ -96,12 +96,13 @@ class FunimationIE(InfoExtractor):
webpage = self._download_webpage( webpage = self._download_webpage(
request, display_id, 'Downloading %s webpage' % kind) request, display_id, 'Downloading %s webpage' % kind)
items = self._parse_json( playlist = self._parse_json(
self._search_regex( self._search_regex(
r'var\s+playersData\s*=\s*(\[.+?\]);\n', r'var\s+playersData\s*=\s*(\[.+?\]);\n',
webpage, 'players data'), webpage, 'players data'),
display_id)[0]['playlist'][0]['items'] display_id)[0]['playlist']
items = next(item['items'] for item in playlist if item.get('items'))
item = next(item for item in items if item.get('itemAK') == display_id) item = next(item for item in items if item.get('itemAK') == display_id)
error_messages = {} error_messages = {}