1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-22 16:44:32 +01:00

[rutube] Fix code style

This commit is contained in:
Alexander Nartov 2020-09-21 04:08:57 +10:00
parent f91625cd12
commit eba856318a

View File

@ -80,19 +80,16 @@ class RutubeBaseIE(InfoExtractor):
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Accept': 'application/json' 'Accept': 'application/json'
}, },
expected_status=400 expected_status=400)
)
if not login.get('success'): if not login.get('success'):
msg = login.get('message') msg = login.get('message')
raise ExtractorError( raise ExtractorError(
'Unable to log in. %s said: %s' % (self.IE_NAME, msg), 'Unable to log in. %s said: %s' % (self.IE_NAME, msg),
expected=True expected=True)
)
self._download_webpage( self._download_webpage(
'https://rutube.ru/social/auth/rupass/?callback_path=/social/login/rupass/', 'https://rutube.ru/social/auth/rupass/?callback_path=/social/login/rupass/',
None, False None, False)
)
def _download_and_extract_info(self, video_id, query=None): def _download_and_extract_info(self, video_id, query=None):
return self._extract_info( return self._extract_info(
@ -183,8 +180,7 @@ class RutubeIE(RutubeBaseIE):
if info['is_club']: if info['is_club']:
visitor_json, urlh = self._download_webpage_handle( visitor_json, urlh = self._download_webpage_handle(
'https://rutube.ru/api/accounts/visitor/', video_id, 'https://rutube.ru/api/accounts/visitor/', video_id,
'Downloading visitor JSON', 'Unable to download visitor JSON' 'Downloading visitor JSON', 'Unable to download visitor JSON')
)
if not visitor_json: if not visitor_json:
self.raise_login_required() self.raise_login_required()
@ -193,8 +189,7 @@ class RutubeIE(RutubeBaseIE):
ad = self._download_json( ad = self._download_json(
'https://mtr.rutube.ru/api/v3/interactive?%s&video_id=%s' % 'https://mtr.rutube.ru/api/v3/interactive?%s&video_id=%s' %
(club_params, video_id), (club_params, video_id),
video_id, 'Downloading AD JSON', 'Unable to download AD JSON' video_id, 'Downloading AD JSON', 'Unable to download AD JSON')
)
club_token = ad['award'] club_token = ad['award']
query.update({ query.update({