1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-12-23 00:16:48 +00:00

flake8 checks

This commit is contained in:
pgaig 2021-07-22 10:10:16 +02:00
parent 17dca698cf
commit 03d89133f3

View File

@ -1,7 +1,6 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import re import re
import json
from .common import InfoExtractor from .common import InfoExtractor
from .gigya import GigyaBaseIE from .gigya import GigyaBaseIE
@ -277,11 +276,11 @@ class VrtNUIE(GigyaBaseIE):
'https://accounts.vrt.be/accounts.login', None, 'https://accounts.vrt.be/accounts.login', None,
note='Login data', errnote='Could not get Login data', note='Login data', errnote='Could not get Login data',
headers={}, data=urlencode_postdata({ headers={}, data=urlencode_postdata({
'loginID':username, 'loginID': username,
'password':password, 'password': password,
'sessionExpiration':'-2', 'sessionExpiration': '-2',
'APIKey':self._APIKEY, 'APIKey': self._APIKEY,
'targetEnv':'jssdk', 'targetEnv': 'jssdk',
})) }))
except ExtractorError as e: except ExtractorError as e:
self.report_warning("Cookie request HTTP code: %s" % e.cause.code) self.report_warning("Cookie request HTTP code: %s" % e.cause.code)
@ -292,9 +291,9 @@ class VrtNUIE(GigyaBaseIE):
while login_attempt <= 3: while login_attempt <= 3:
try: try:
# get XSRF Token # get XSRF Token
xsrf_req = self._request_webpage('https://token.vrt.be/vrtnuinitlogin', self._request_webpage('https://token.vrt.be/vrtnuinitlogin',
None, note='Requesting XSRF Token', errnote='Could not get XSRF Token', None, note='Requesting XSRF Token', errnote='Could not get XSRF Token',
query={'provider':'site', 'destination':'https://www.vrt.be/vrtnu/'}) query={'provider': 'site', 'destination': 'https://www.vrt.be/vrtnu/'})
post_data = { post_data = {
'UID': auth_info['UID'], 'UID': auth_info['UID'],
@ -308,7 +307,7 @@ class VrtNUIE(GigyaBaseIE):
break break
# do login # do login
vrt_token = self._request_webpage( self._request_webpage(
'https://login.vrt.be/perform_login', 'https://login.vrt.be/perform_login',
None, note='Requesting a token', errnote='Could not get a token', None, note='Requesting a token', errnote='Could not get a token',
headers={}, data=urlencode_postdata(post_data) headers={}, data=urlencode_postdata(post_data)