1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-29 05:32:00 +00:00

[common] Extract series name from ld+json types such as TVSeries

This commit is contained in:
dirkf 2022-05-04 17:30:07 +01:00
parent e988fa4523
commit 2e8984e8c2

View file

@ -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')),