mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-05-22 18:05:46 -05:00
Fix _real_extract
This commit is contained in:
parent
ab93699b6a
commit
6465be6c2f
1 changed files with 4 additions and 2 deletions
|
@ -336,9 +336,10 @@ def _perform_login(self, username, password):
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
display_id = self._match_id(url)
|
display_id = self._match_id(url)
|
||||||
|
refresh_token = self._fetch_refresh_token()
|
||||||
|
|
||||||
metadata = self._download_json(
|
metadata = self._download_json(
|
||||||
f'https://www.vrt.be/vrtnu-api/graphql{"" if self._fetch_refresh_token() else "/public"}/v1',
|
f'https://www.vrt.be/vrtnu-api/graphql{"" if refresh_token else "/public"}/v1',
|
||||||
display_id, 'Downloading asset JSON', 'Unable to download asset JSON',
|
display_id, 'Downloading asset JSON', 'Unable to download asset JSON',
|
||||||
data=json.dumps({
|
data=json.dumps({
|
||||||
'operationName': 'VideoPage',
|
'operationName': 'VideoPage',
|
||||||
|
@ -346,7 +347,8 @@ def _real_extract(self, url):
|
||||||
'variables': {'pageId': urllib.parse.urlparse(url).path},
|
'variables': {'pageId': urllib.parse.urlparse(url).path},
|
||||||
}).encode(),
|
}).encode(),
|
||||||
headers={
|
headers={
|
||||||
'content-type': 'application/json',
|
'Authorization': f'Bearer {refresh_token}' if refresh_token else None,
|
||||||
|
'Content-Type': 'application/json',
|
||||||
'x-vrt-client-name': 'WEB',
|
'x-vrt-client-name': 'WEB',
|
||||||
'x-vrt-client-version': '1.5.9',
|
'x-vrt-client-version': '1.5.9',
|
||||||
'x-vrt-zone': 'default',
|
'x-vrt-zone': 'default',
|
||||||
|
|
Loading…
Reference in a new issue