From 2e8984e8c221e719eddf587e1cc1ed7bcfcd19d0 Mon Sep 17 00:00:00 2001 From: dirkf Date: Wed, 4 May 2022 17:30:07 +0100 Subject: [PATCH] [common] Extract series name from ld+json types such as TVSeries --- youtube_dl/extractor/common.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 797c35fd5..526d3483e 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -1319,6 +1319,11 @@ class InfoExtractor(object): 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')) + elif item_type in ('TVSeries', 'Series', 'CreativeWorkSeries'): + series_name = unescapeHTML(e.get('name')) + info.update({ + 'series': series_name, + }) elif item_type == 'Movie': info.update({ 'title': unescapeHTML(e.get('name')),