aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/dcn.py
diff options
context:
space:
mode:
authorremitamine <remitamine@gmail.com>2015-10-31 15:40:11 +0100
committerremitamine <remitamine@gmail.com>2015-10-31 15:40:11 +0100
commit50b9dd734423231f7a01ed8a156d09ca04a23a31 (patch)
tree6d51e5c0e57cbd782c1e7094f47a046c4e70ac50 /youtube_dl/extractor/dcn.py
parent486375154cb7d79bd084879467bc70550104b555 (diff)
[dcn] improve season info extraction
Diffstat (limited to 'youtube_dl/extractor/dcn.py')
-rw-r--r--youtube_dl/extractor/dcn.py24
1 files changed, 11 insertions, 13 deletions
diff --git a/youtube_dl/extractor/dcn.py b/youtube_dl/extractor/dcn.py
index 8b360a9d7..a9a5e94f5 100644
--- a/youtube_dl/extractor/dcn.py
+++ b/youtube_dl/extractor/dcn.py
@@ -210,16 +210,14 @@ class DCNSeasonIE(InfoExtractor):
})
show = self._download_json(request, show_id)
- season_id = season_id or show['default_season']
- season = {}
- for _ in show['seasons']:
- if _['id'] == season_id:
- season = _
- break
- title = season.get('title_en') or season['title_ar']
-
- entries = []
- for video in show['videos']:
- entries.append(self.url_result('http://www.dcndigital.ae/#/media/%s' % video['id'], 'DCNVideo'))
-
- return self.playlist_result(entries, season_id, title)
+ if not season_id:
+ season_id = show['default_season']
+ for season in show['seasons']:
+ if season['id'] == season_id:
+ title = season.get('title_en') or season['title_ar']
+
+ entries = []
+ for video in show['videos']:
+ entries.append(self.url_result('http://www.dcndigital.ae/#/media/%s' % video['id'], 'DCNVideo'))
+
+ return self.playlist_result(entries, season_id, title)