A feature-rich command-line audio/video downloader
remove unnecessary assignment parenthesis
Remita Amine68217024e83c
diff --git a/youtube_dl/extractor/animeondemand.py b/youtube_dl/extractor/animeondemand.pyindex e4fa72f466..1fe5d5e56e 100644--- a/youtube_dl/extractor/animeondemand.py+++ b/youtube_dl/extractor/animeondemand.py@@ -52,7 +52,7 @@ class AnimeOnDemandIE(InfoExtractor):}]def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if username is None:returndiff --git a/youtube_dl/extractor/atresplayer.py b/youtube_dl/extractor/atresplayer.pyindex 1a31ebe082..ae1c094277 100644--- a/youtube_dl/extractor/atresplayer.py+++ b/youtube_dl/extractor/atresplayer.py@@ -74,7 +74,7 @@ class AtresPlayerIE(InfoExtractor):self._login()def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if username is None:returndiff --git a/youtube_dl/extractor/bambuser.py b/youtube_dl/extractor/bambuser.pyindex 633c57553d..34f1b3d836 100644--- a/youtube_dl/extractor/bambuser.py+++ b/youtube_dl/extractor/bambuser.py@@ -44,7 +44,7 @@ class BambuserIE(InfoExtractor):}def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if username is None:returndiff --git a/youtube_dl/extractor/crunchyroll.py b/youtube_dl/extractor/crunchyroll.pyindex 3efdc8c21d..311da515df 100644--- a/youtube_dl/extractor/crunchyroll.py+++ b/youtube_dl/extractor/crunchyroll.py@@ -49,7 +49,7 @@ class CrunchyrollBaseIE(InfoExtractor):})def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if username is None:returndiff --git a/youtube_dl/extractor/curiositystream.py b/youtube_dl/extractor/curiositystream.pyindex 8e45923e3d..35b1e7a34e 100644--- a/youtube_dl/extractor/curiositystream.py+++ b/youtube_dl/extractor/curiositystream.py@@ -35,7 +35,7 @@ class CuriosityStreamBaseIE(InfoExtractor):return result['data']def _real_initialize(self):- (email, password) = self._get_login_info()+ email, password = self._get_login_info()if email is None:returnresult = self._download_json(diff --git a/youtube_dl/extractor/dramafever.py b/youtube_dl/extractor/dramafever.pyindex ffbd2623d1..ab32ba4ff3 100644--- a/youtube_dl/extractor/dramafever.py+++ b/youtube_dl/extractor/dramafever.py@@ -42,7 +42,7 @@ class DramaFeverBaseIE(InfoExtractor):self._login()def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if username is None:returndiff --git a/youtube_dl/extractor/facebook.py b/youtube_dl/extractor/facebook.pyindex 220ada3a6d..0971ce3564 100644--- a/youtube_dl/extractor/facebook.py+++ b/youtube_dl/extractor/facebook.py@@ -226,7 +226,7 @@ class FacebookIE(InfoExtractor):return urlsdef _login(self):- (useremail, password) = self._get_login_info()+ useremail, password = self._get_login_info()if useremail is None:returndiff --git a/youtube_dl/extractor/fc2.py b/youtube_dl/extractor/fc2.pyindex 448647d727..435561147f 100644--- a/youtube_dl/extractor/fc2.py+++ b/youtube_dl/extractor/fc2.py@@ -46,7 +46,7 @@ class FC2IE(InfoExtractor):}]def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if username is None or password is None:return Falsediff --git a/youtube_dl/extractor/funimation.py b/youtube_dl/extractor/funimation.pyindex 107f658baf..07d01caecf 100644--- a/youtube_dl/extractor/funimation.py+++ b/youtube_dl/extractor/funimation.py@@ -51,7 +51,7 @@ class FunimationIE(InfoExtractor):}]def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if username is None:returntry:diff --git a/youtube_dl/extractor/gdcvault.py b/youtube_dl/extractor/gdcvault.pyindex f71d9092e5..8806dc48a9 100644--- a/youtube_dl/extractor/gdcvault.py+++ b/youtube_dl/extractor/gdcvault.py@@ -91,7 +91,7 @@ class GDCVaultIE(InfoExtractor):]def _login(self, webpage_url, display_id):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if username is None or password is None:self.report_warning('It looks like ' + webpage_url + ' requires a login. Try specifying a username and password and try again.')return Nonediff --git a/youtube_dl/extractor/globo.py b/youtube_dl/extractor/globo.pyindex 81d6d36d32..c2140c3627 100644--- a/youtube_dl/extractor/globo.py+++ b/youtube_dl/extractor/globo.py@@ -23,7 +23,6 @@ from ..utils import (class GloboIE(InfoExtractor):_VALID_URL = r'(?:globo:|https?://.+?\.globo\.com/(?:[^/]+/)*(?:v/(?:[^/]+/)?|videos/))(?P<id>\d{7,})'- _LOGGED_IN = False_NETRC_MACHINE = 'globo'_TESTS = [{'url': 'http://g1.globo.com/carros/autoesporte/videos/t/exclusivos-do-g1/v/mercedes-benz-gla-passa-por-teste-de-colisao-na-europa/3607726/',@@ -68,9 +67,6 @@ class GloboIE(InfoExtractor):}]def _real_initialize(self):- if self._LOGGED_IN:- return-email, password = self._get_login_info()if email is None:return@@ -91,7 +87,6 @@ class GloboIE(InfoExtractor):resp = self._parse_json(e.cause.read(), None)raise ExtractorError(resp.get('userMessage') or resp['id'], expected=True)raise- self._LOGGED_IN = Truedef _real_extract(self, url):video_id = self._match_id(url)diff --git a/youtube_dl/extractor/hidive.py b/youtube_dl/extractor/hidive.pyindex d8f2e682fb..39fabe8a55 100644--- a/youtube_dl/extractor/hidive.py+++ b/youtube_dl/extractor/hidive.py@@ -18,7 +18,6 @@ class HiDiveIE(InfoExtractor):# so disabling geo bypass completely_GEO_BYPASS = False_NETRC_MACHINE = 'hidive'- _LOGGED_IN = False_LOGIN_URL = 'https://www.hidive.com/account/login'_TESTS = [{@@ -38,10 +37,7 @@ class HiDiveIE(InfoExtractor):}]def _real_initialize(self):- if self._LOGGED_IN:- return-- (email, password) = self._get_login_info()+ email, password = self._get_login_info()if email is None:return@@ -56,7 +52,6 @@ class HiDiveIE(InfoExtractor):})self._download_webpage(self._LOGIN_URL, None, 'Logging in', data=urlencode_postdata(data))- self._LOGGED_IN = Truedef _real_extract(self, url):mobj = re.match(self._VALID_URL, url)diff --git a/youtube_dl/extractor/hrti.py b/youtube_dl/extractor/hrti.pyindex 6424d34ac4..9ba1aa7032 100644--- a/youtube_dl/extractor/hrti.py+++ b/youtube_dl/extractor/hrti.py@@ -66,7 +66,7 @@ class HRTiBaseIE(InfoExtractor):self._logout_url = modules['user']['resources']['logout']['uri']def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()# TODO: figure out authentication with cookiesif username is None or password is None:self.raise_login_required()diff --git a/youtube_dl/extractor/iqiyi.py b/youtube_dl/extractor/iqiyi.pyindex fdfa7de9ef..4b081bd469 100644--- a/youtube_dl/extractor/iqiyi.py+++ b/youtube_dl/extractor/iqiyi.py@@ -239,7 +239,7 @@ class IqiyiIE(InfoExtractor):return ohdave_rsa_encrypt(data, e, N)def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()# No authentication to be performedif not username:diff --git a/youtube_dl/extractor/niconico.py b/youtube_dl/extractor/niconico.pyindex df7f528be2..dbe871f165 100644--- a/youtube_dl/extractor/niconico.py+++ b/youtube_dl/extractor/niconico.py@@ -163,7 +163,7 @@ class NiconicoIE(InfoExtractor):self._login()def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()# No authentication to be performedif not username:return Truediff --git a/youtube_dl/extractor/noco.py b/youtube_dl/extractor/noco.pyindex a9f9b10c47..58b371ed74 100644--- a/youtube_dl/extractor/noco.py+++ b/youtube_dl/extractor/noco.py@@ -65,7 +65,7 @@ class NocoIE(InfoExtractor):self._login()def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if username is None:returndiff --git a/youtube_dl/extractor/packtpub.py b/youtube_dl/extractor/packtpub.pyindex 8ed3c6347c..56a2a1083a 100644--- a/youtube_dl/extractor/packtpub.py+++ b/youtube_dl/extractor/packtpub.py@@ -42,7 +42,7 @@ class PacktPubIE(PacktPubBaseIE):_TOKEN = Nonedef _real_initialize(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if username is None:returntry:diff --git a/youtube_dl/extractor/patreon.py b/youtube_dl/extractor/patreon.pyindex d4b1d34ca8..9eb0276795 100644--- a/youtube_dl/extractor/patreon.py+++ b/youtube_dl/extractor/patreon.py@@ -53,7 +53,7 @@ class PatreonIE(InfoExtractor):# needed. Keeping this commented for when this inevitably changes.'''def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if username is None:returndiff --git a/youtube_dl/extractor/pluralsight.py b/youtube_dl/extractor/pluralsight.pyindex 3c508c9ca0..a207ca9cb9 100644--- a/youtube_dl/extractor/pluralsight.py+++ b/youtube_dl/extractor/pluralsight.py@@ -94,7 +94,7 @@ class PluralsightIE(PluralsightBaseIE):self._login()def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if username is None:returndiff --git a/youtube_dl/extractor/roosterteeth.py b/youtube_dl/extractor/roosterteeth.pyindex 8b703800ec..857434540d 100644--- a/youtube_dl/extractor/roosterteeth.py+++ b/youtube_dl/extractor/roosterteeth.py@@ -50,7 +50,7 @@ class RoosterTeethIE(InfoExtractor):}]def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if username is None:returndiff --git a/youtube_dl/extractor/safari.py b/youtube_dl/extractor/safari.pyindex cc6698f882..8a5d48fc2c 100644--- a/youtube_dl/extractor/safari.py+++ b/youtube_dl/extractor/safari.py@@ -27,7 +27,7 @@ class SafariBaseIE(InfoExtractor):self._login()def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if username is None:returndiff --git a/youtube_dl/extractor/sina.py b/youtube_dl/extractor/sina.pyindex 8fc66732af..07b766b4a7 100644--- a/youtube_dl/extractor/sina.py+++ b/youtube_dl/extractor/sina.py@@ -64,7 +64,7 @@ class SinaIE(InfoExtractor):# The video id is in the redirected urlself.to_screen('Getting video id')request = HEADRequest(url)- (_, urlh) = self._download_webpage_handle(request, 'NA', False)+ _, urlh = self._download_webpage_handle(request, 'NA', False)return self._real_extract(urlh.geturl())else:pseudo_id = mobj.group('pseudo_id')diff --git a/youtube_dl/extractor/tennistv.py b/youtube_dl/extractor/tennistv.pyindex 0c6f70784c..a586f30ad5 100644--- a/youtube_dl/extractor/tennistv.py+++ b/youtube_dl/extractor/tennistv.py@@ -32,7 +32,7 @@ class TennisTVIE(InfoExtractor):_NETRC_MACHINE = 'tennistv'def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if not username or not password:raise ExtractorError('No login info available, needed for using %s.' % self.IE_NAME, expected=True)diff --git a/youtube_dl/extractor/tubitv.py b/youtube_dl/extractor/tubitv.pyindex 36f6c16732..a51fa6515e 100644--- a/youtube_dl/extractor/tubitv.py+++ b/youtube_dl/extractor/tubitv.py@@ -36,7 +36,7 @@ class TubiTvIE(InfoExtractor):}]def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if username is None:returnself.report_login()diff --git a/youtube_dl/extractor/tumblr.py b/youtube_dl/extractor/tumblr.pyindex 89e6eb5abb..edbb0aa694 100644--- a/youtube_dl/extractor/tumblr.py+++ b/youtube_dl/extractor/tumblr.py@@ -108,7 +108,7 @@ class TumblrIE(InfoExtractor):self._login()def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if username is None:returndiff --git a/youtube_dl/extractor/twitch.py b/youtube_dl/extractor/twitch.pyindex 3ee2af52e8..e01f113310 100644--- a/youtube_dl/extractor/twitch.py+++ b/youtube_dl/extractor/twitch.py@@ -61,7 +61,7 @@ class TwitchBaseIE(InfoExtractor):self._login()def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if username is None:returndiff --git a/youtube_dl/extractor/udemy.py b/youtube_dl/extractor/udemy.pyindex 0a74a97689..a7196997ec 100644--- a/youtube_dl/extractor/udemy.py+++ b/youtube_dl/extractor/udemy.py@@ -151,7 +151,7 @@ class UdemyIE(InfoExtractor):self._login()def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if username is None:returndiff --git a/youtube_dl/extractor/vessel.py b/youtube_dl/extractor/vessel.pyindex 80a643dfe6..31eee0ba72 100644--- a/youtube_dl/extractor/vessel.py+++ b/youtube_dl/extractor/vessel.py@@ -75,7 +75,7 @@ class VesselIE(InfoExtractor):'Access to this content is restricted. (%s said: %s)' % (self.IE_NAME, err_code), expected=True)def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if username is None:returnself.report_login()diff --git a/youtube_dl/extractor/viki.py b/youtube_dl/extractor/viki.pyindex ad2a2a4b70..546de95d85 100644--- a/youtube_dl/extractor/viki.py+++ b/youtube_dl/extractor/viki.py@@ -88,7 +88,7 @@ class VikiBaseIE(InfoExtractor):self._login()def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if username is None:returndiff --git a/youtube_dl/extractor/vimeo.py b/youtube_dl/extractor/vimeo.pyindex 8dfd8891ce..3baa2d0755 100644--- a/youtube_dl/extractor/vimeo.py+++ b/youtube_dl/extractor/vimeo.py@@ -37,7 +37,7 @@ class VimeoBaseInfoExtractor(InfoExtractor):_LOGIN_URL = 'https://vimeo.com/log_in'def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if username is None:if self._LOGIN_REQUIRED:raise ExtractorError('No login info available, needed for using %s.' % self.IE_NAME, expected=True)diff --git a/youtube_dl/extractor/vk.py b/youtube_dl/extractor/vk.pyindex b50d4f1703..29002b35fc 100644--- a/youtube_dl/extractor/vk.py+++ b/youtube_dl/extractor/vk.py@@ -32,7 +32,7 @@ class VKBaseIE(InfoExtractor):_NETRC_MACHINE = 'vk'def _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if username is None:returndiff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.pyindex e4eec7c308..379559825b 100644--- a/youtube_dl/extractor/youtube.py+++ b/youtube_dl/extractor/youtube.py@@ -85,7 +85,7 @@ class YoutubeBaseInfoExtractor(InfoExtractor):If _LOGIN_REQUIRED is set and no authentication was provided, an error is raised."""- (username, password) = self._get_login_info()+ username, password = self._get_login_info()# No authentication to be performedif username is None:if self._LOGIN_REQUIRED and self._downloader.params.get('cookiefile') is None:diff --git a/youtube_dl/extractor/zattoo.py b/youtube_dl/extractor/zattoo.pyindex 773073d85b..b5a3a07168 100644--- a/youtube_dl/extractor/zattoo.py+++ b/youtube_dl/extractor/zattoo.py@@ -24,7 +24,7 @@ class ZattooBaseIE(InfoExtractor):_power_guide_hash = Nonedef _login(self):- (username, password) = self._get_login_info()+ username, password = self._get_login_info()if not username or not password:self.raise_login_required('A valid %s account is needed to access this media.'