[allocine] Fix extraction
authorplroman <dev@plr.pm>
Tue, 28 Mar 2017 21:23:20 +0000 (23:23 +0200)
committerSergey M <dstftw@gmail.com>
Tue, 28 Mar 2017 21:23:20 +0000 (05:23 +0800)
youtube_dl/extractor/allocine.py

index 90f11d39f5393528e75ff641342cfda8c8706e0b..0463a070b2d784178da682c2ba6831c69ee7d07e 100644 (file)
@@ -70,7 +70,7 @@ class AllocineIE(InfoExtractor):
         if model:
             model_data = self._parse_json(model, display_id)
 
-            for video_url in model_data['sources'].values():
+            for video_url in model_data['videos'][0]['sources'].values():
                 video_id, format_id = url_basename(video_url).split('_')[:2]
                 formats.append({
                     'format_id': format_id,
@@ -78,7 +78,7 @@ class AllocineIE(InfoExtractor):
                     'url': video_url,
                 })
 
-            title = model_data['title']
+            title = model_data['videos'][0]['title']
         else:
             video_id = display_id
             media_data = self._download_json(