From ca09b12c5742faac59bb6f2991b2ff0eee7a8541 Mon Sep 17 00:00:00 2001 From: Simon Carpentier Date: Tue, 2 Jan 2018 10:37:55 -0500 Subject: [PATCH 1/2] Limelight extractor "pc" playlist might be null --- youtube_dl/extractor/limelight.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/limelight.py b/youtube_dl/extractor/limelight.py index ad65b2759..817ad9dba 100644 --- a/youtube_dl/extractor/limelight.py +++ b/youtube_dl/extractor/limelight.py @@ -283,7 +283,7 @@ class LimelightMediaIE(LimelightBaseIE): smuggled_data.get('source_url')) return self._extract_info( - pc['playlistItems'][0].get('streams', []), + pc['playlistItems'][0].get('streams', []) if pc else [], mobile['mediaList'][0].get('mobileUrls', []) if mobile else [], metadata) From 2fb4d51a005399a8ad1bf6143d39a14206be270f Mon Sep 17 00:00:00 2001 From: Simon Carpentier Date: Tue, 2 Jan 2018 10:39:23 -0500 Subject: [PATCH 2/2] Updated limelight tests for null pc playlist --- youtube_dl/extractor/limelight.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/limelight.py b/youtube_dl/extractor/limelight.py index 817ad9dba..28d5d1525 100644 --- a/youtube_dl/extractor/limelight.py +++ b/youtube_dl/extractor/limelight.py @@ -327,7 +327,7 @@ class LimelightChannelIE(LimelightBaseIE): entries = [ self._extract_info( - pc['playlistItems'][i].get('streams', []), + pc['playlistItems'][i].get('streams', []) if pc else [], mobile['mediaList'][i].get('mobileUrls', []) if mobile else [], medias['media_list'][i]) for i in range(len(medias['media_list']))]