mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-11-14 22:37:59 +09:00
[common] Extract series name from ld+json types such as TVSeries
This commit is contained in:
parent
e988fa4523
commit
2e8984e8c2
@ -1319,6 +1319,11 @@ class InfoExtractor(object):
|
|||||||
part_of_series = e.get('partOfSeries') or e.get('partOfTVSeries')
|
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'):
|
if isinstance(part_of_series, dict) and part_of_series.get('@type') in ('TVSeries', 'Series', 'CreativeWorkSeries'):
|
||||||
info['series'] = unescapeHTML(part_of_series.get('name'))
|
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':
|
elif item_type == 'Movie':
|
||||||
info.update({
|
info.update({
|
||||||
'title': unescapeHTML(e.get('name')),
|
'title': unescapeHTML(e.get('name')),
|
||||||
|
Loading…
Reference in New Issue
Block a user