Compare commits

..

2 Commits

Author SHA1 Message Date
Aniol Pagès
d2e06b56d6
Update yt_dlp/extractor/laxarxames.py
Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
2023-11-01 12:14:16 +01:00
Aniol Pagès
bf6d3c1ca0
Update yt_dlp/extractor/laxarxames.py
Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
2023-11-01 12:13:34 +01:00

View File

@ -26,7 +26,14 @@ class LaXarxaMesIE(InfoExtractor):
'Accept': 'application/json, text/plain, */*',
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)',
'Origin': 'https://www.laxarxames.cat',
}, data=b'{"Username":"%s","Password":"%s","Device":{"PlatformCode":"WEB","Name":"Mac OS ()"}}' % (username.encode(), password.encode())
}, data=json.dumps({
'Username': username,
'Password': password,
'Device': {
'PlatformCode': 'WEB',
'Name': 'Mac OS ()',
},
}).encode('utf-8'))
)
if not login['AuthorizationToken']:
@ -39,7 +46,7 @@ class LaXarxaMesIE(InfoExtractor):
authorization = self._get_cookies('https://www.laxarxames.cat/').get('didomi_token')
if not authorization:
raise Exception('No authorization token found. Log in with --netrc or --username and --password')
self.raise_login_required()
mediaplayinfo = self._download_json(
'https://api.laxarxames.cat/Media/GetMediaPlayInfo',
video_id,