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:
parent
e988fa4523
commit
2e8984e8c2
1 changed files with 5 additions and 0 deletions
|
@ -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')),
|
||||
|
|
Loading…
Reference in a new issue