mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-22 02:11:26 +02:00
Compare commits
2 Commits
71229c9cf0
...
d2e06b56d6
Author | SHA1 | Date | |
---|---|---|---|
|
d2e06b56d6 | ||
|
bf6d3c1ca0 |
|
@ -26,7 +26,14 @@ class LaXarxaMesIE(InfoExtractor):
|
||||||
'Accept': 'application/json, text/plain, */*',
|
'Accept': 'application/json, text/plain, */*',
|
||||||
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)',
|
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)',
|
||||||
'Origin': 'https://www.laxarxames.cat',
|
'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']:
|
if not login['AuthorizationToken']:
|
||||||
|
@ -39,7 +46,7 @@ class LaXarxaMesIE(InfoExtractor):
|
||||||
authorization = self._get_cookies('https://www.laxarxames.cat/').get('didomi_token')
|
authorization = self._get_cookies('https://www.laxarxames.cat/').get('didomi_token')
|
||||||
|
|
||||||
if not authorization:
|
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(
|
mediaplayinfo = self._download_json(
|
||||||
'https://api.laxarxames.cat/Media/GetMediaPlayInfo',
|
'https://api.laxarxames.cat/Media/GetMediaPlayInfo',
|
||||||
video_id,
|
video_id,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user