1
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-03-09 12:50:23 -05:00

adjust media_data

Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
This commit is contained in:
v3DJG6GL 2025-03-03 23:54:31 +01:00 committed by GitHub
parent fc6233c5d1
commit 254f8376c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -237,10 +237,7 @@ def _real_extract(self, url):
self.raise_login_required(method='password')
media_id = self._match_id(url)
query = parse_qs(url)
locale_param = (query.get('locale') or ['de'])[0].lower()
locale = locale_param if locale_param in {'de', 'fr', 'it', 'rm'} else 'de'
media_data = self._get_media_data(media_id, locale)
media_data = self._get_media_data(media_id, traverse_obj(parse_qs(url), ('locale', '0'), default='de'))
info = self._extract_single(media_data)
if media_data.get('episodes'):
info.update({