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

remove unneeded repetition and whitespace

This commit is contained in:
juzza1 2019-05-19 23:34:19 +03:00
parent d31de94973
commit 05807d9c1f

View File

@ -92,11 +92,10 @@ class RuutuIE(InfoExtractor):
Returns original video url with authentication token Returns original video url with authentication token
appended. Required for most videos since early 2019. appended. Required for most videos since early 2019.
""" """
authenticated_url = self._download_webpage( return self._download_webpage(
'https://gatling.nelonenmedia.fi/auth/access/v2', 'https://gatling.nelonenmedia.fi/auth/access/v2',
video_id, query={'stream': url}, video_id, query={'stream': url},
note='Authenticating video url', fatal=False) note='Authenticating video url', fatal=False)
return authenticated_url
def extract_formats(node): def extract_formats(node):
for child in node: for child in node:
@ -112,8 +111,7 @@ class RuutuIE(InfoExtractor):
if not self._request_webpage( if not self._request_webpage(
video_url, video_id, video_url, video_id,
note='Checking if video is available without authentication', note='Checking if video is available without authentication',
errnote='Authentication required', errnote='Authentication required', fatal=False):
fatal=False):
video_url = authenticate_video_url(video_url) video_url = authenticate_video_url(video_url)
if not video_url: if not video_url:
continue continue
@ -177,8 +175,7 @@ class RuutuIE(InfoExtractor):
raise ExtractorError( raise ExtractorError(
("Probably a Ruutu+ video, authentication required. " ("Probably a Ruutu+ video, authentication required. "
"Consider sending PR for proper handling of Ruutu+ " "Consider sending PR for proper handling of Ruutu+ "
"videos with credentials."), "videos with credentials."), expected=True)
expected=True)
self._sort_formats(formats) self._sort_formats(formats)