From e0556cd956b62b9ea10e2a9478c1e1fad856c6e6 Mon Sep 17 00:00:00 2001 From: pgaig Date: Tue, 3 Aug 2021 08:48:41 +0200 Subject: [PATCH] cleaner access to the OIDCXSRF cookie --- youtube_dl/extractor/canvas.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/youtube_dl/extractor/canvas.py b/youtube_dl/extractor/canvas.py index f04aaf007..13d3ea3c2 100644 --- a/youtube_dl/extractor/canvas.py +++ b/youtube_dl/extractor/canvas.py @@ -294,11 +294,8 @@ class VrtNUIE(GigyaBaseIE): 'UIDSignature': auth_info['UIDSignature'], 'signatureTimestamp': auth_info['signatureTimestamp'], 'client_id': 'vrtnu-site', + '_csrf': self._get_cookies('https://login.vrt.be/').get('OIDCXSRF').value } - for cookie in self._downloader.cookiejar: - if cookie.name == 'OIDCXSRF': - post_data['_csrf'] = cookie.value - break self._request_webpage( 'https://login.vrt.be/perform_login',