diff options
author | Sergey M․ <dstftw@gmail.com> | 2019-01-27 04:36:58 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2019-01-27 04:36:58 +0700 |
commit | 458fd30f56785d514862dcb8a604a329d8e29ec6 (patch) | |
tree | c608bf097baef2cc5369ada3c8f9f77a1fdc9201 | |
parent | 845333acf6280761d19f91b3e018c418d922a0de (diff) |
[extractor/common] Extract season in _json_ld
-rw-r--r-- | youtube_dl/extractor/common.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 95456b291..c4ea2882f 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -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')) |