[extractor/common] Extract season in _json_ld
authorSergey M․ <dstftw@gmail.com>
Sat, 26 Jan 2019 21:36:58 +0000 (04:36 +0700)
committerSergey M․ <dstftw@gmail.com>
Sat, 26 Jan 2019 21:36:58 +0000 (04:36 +0700)
youtube_dl/extractor/common.py

index 95456b291b116e8a14b0d5d945a5bd33fd4a566c..c4ea2882f4260f52f184c36f7b6c078b874dca53 100644 (file)
@@ -1249,7 +1249,10 @@ class InfoExtractor(object):
                         info['title'] = episode_name
                     part_of_season = e.get('partOfSeason')
                     if isinstance(part_of_season, dict) and part_of_season.get('@type') in ('TVSeason', 'Season', 'CreativeWorkSeason'):
-                        info['season_number'] = int_or_none(part_of_season.get('seasonNumber'))
+                        info.update({
+                            'season': unescapeHTML(part_of_season.get('name')),
+                            'season_number': int_or_none(part_of_season.get('seasonNumber')),
+                        })
                     part_of_series = e.get('partOfSeries') or e.get('partOfTVSeries')
                     if isinstance(part_of_series, dict) and part_of_series.get('@type') in ('TVSeries', 'Series', 'CreativeWorkSeries'):
                         info['series'] = unescapeHTML(part_of_series.get('name'))