mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-04-08 01:43:47 +00:00
fix release_year extraction for edge cases
only use the first four characters. This handles cases in which the value “year” consists of more than one year. Example: https://www.playsuisse.ch/detail/947691
This commit is contained in:
parent
2bb735e47c
commit
fa7b182291
@ -56,7 +56,7 @@ class PlaySuisseIE(InfoExtractor):
|
||||
'cast': 'Fabrizio Rongione; Stéphanie Cléau; Gilles Privat; Alexandre Trocki',
|
||||
'location': 'France; Argentine',
|
||||
'release_year': 2021,
|
||||
'duration': 5715,
|
||||
'duration': 5981,
|
||||
'thumbnail': 're:https://playsuisse-img.akamaized.net/',
|
||||
},
|
||||
}, {
|
||||
@ -283,7 +283,7 @@ class PlaySuisseIE(InfoExtractor):
|
||||
'creators': ('directors', ..., {str}, all, {unpack(join_nonempty, delim='; ')}, filter),
|
||||
'cast': ('mainCast', ..., {str}, all, {unpack(join_nonempty, delim='; ')}, filter),
|
||||
'location': ('productionCountries', ..., {str}, all, {unpack(join_nonempty, delim='; ')}, filter),
|
||||
'release_year': ('year', {int_or_none}),
|
||||
'release_year': ('year', {str}, {lambda x: x[:4]}, {int_or_none}),
|
||||
'duration': ('duration', {int_or_none}),
|
||||
'series': ('seriesName', {str}),
|
||||
'season_number': ('seasonNumber', {int_or_none}),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user