document updated login procedure
This commit is contained in:
parent
c25869428f
commit
1a37e51dd4
|
@ -58,9 +58,51 @@ session.post('https://token.vrt.be',
|
|||
'ts': auth_info['signatureTimestamp'],
|
||||
'email': auth_info['profile']['email'],
|
||||
}).encode('utf-8'))
|
||||
|
||||
token = session.post('https://media-services-public.vrt.be/vualto-video-aggregator-web/rest/external/v1/tokens', headers={'Content-Type': 'application/json'}, data=b'').json()['vrtPlayerToken']
|
||||
```
|
||||
|
||||
### update sept 2021
|
||||
```
|
||||
session = requests.session()
|
||||
username = urllib.parse.quote('<vrtnu username here>', safe='')
|
||||
password = urllib.parse.quote('<vrtnu password here>', safe='')
|
||||
|
||||
data={
|
||||
'loginID': username,
|
||||
'password': password,
|
||||
'sessionExpiration': '-2',
|
||||
'APIKey': '3_qhEcPa5JGFROVwu5SWKqJ4mVOIkwlFNMSKwzPDAh8QZOtHqu6L4nD5Q7lk0eXOOG',
|
||||
'targetEnv': 'jssdk',
|
||||
}
|
||||
|
||||
|
||||
auth_info = requests.post('https://accounts.vrt.be/accounts.login', data=data).json()
|
||||
# get crsrf cookie
|
||||
session.get('https://token.vrt.be/vrtnuinitlogin?provider=site&destination=https://www.vrt.be/vrtnu/')
|
||||
# do login
|
||||
session.post('https://login.vrt.be/perform_login',
|
||||
data={
|
||||
'UID': auth_info['UID'],
|
||||
'UIDSignature': auth_info['UIDSignature'],
|
||||
'signatureTimestamp': auth_info['signatureTimestamp'],
|
||||
'client_id': 'vrtnu-site',
|
||||
'_csrf': session.cookies['OIDCXSRF'],
|
||||
#'email': auth_info['profile']['email'],
|
||||
})
|
||||
|
||||
|
||||
token = session.post('https://media-services-public.vrt.be/vualto-video-aggregator-web/rest/external/v1/tokens', headers={'Content-Type': 'application/json'}, data=b'').json()['vrtPlayerToken']
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
vrtnu-site_profile_vt contains a token:
|
||||
|
||||
|
||||
data = {"identityToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2xvZ2luLnZydC5iZSIsImF1ZCI6InZydG51LXNpdGUiLCJpYXQiOjE2MzE2NDkwNjAsImV4cCI6MTYzMTY1MjY2MCwic3ViIjoiOThmODNkNzMtNzlmNi00YTY4LWEzMmYtODBkMzlmMGRkZmE5IiwiYWMiOiIxNisiLCJ1c2VyX3N0YXR1cyI6IlZFUklGSUVEX0JFX1JFU0lERU5UIn0.NM4Fqg-6C_v5PMfizd-_5ZUfGD40D3S7wvG8WPpFJu8"}
|
||||
|
||||
|
||||
get video data
|
||||
|
|
Loading…
Reference in New Issue