aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-12-12 00:48:09 +0600
committerSergey M․ <dstftw@gmail.com>2015-12-12 00:48:09 +0600
commitf208e52a76231b112c6a9d64e2fd32712e7812e0 (patch)
treeaf95986aa856db83f3ae6eba4469cd59407f0690 /youtube_dl/extractor
parentb091529a3ccfdcc638939b71f53708f944450df1 (diff)
[funimation] Fix promotional videos extraction
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/funimation.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/extractor/funimation.py b/youtube_dl/extractor/funimation.py
index 0b4279612..5322e4e93 100644
--- a/youtube_dl/extractor/funimation.py
+++ b/youtube_dl/extractor/funimation.py
@@ -96,12 +96,13 @@ class FunimationIE(InfoExtractor):
webpage = self._download_webpage(
request, display_id, 'Downloading %s webpage' % kind)
- items = self._parse_json(
+ playlist = self._parse_json(
self._search_regex(
r'var\s+playersData\s*=\s*(\[.+?\]);\n',
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)
error_messages = {}