remove unnecessary assignment parenthesis
authorRemita Amine <remitamine@gmail.com>
Sat, 26 May 2018 15:12:44 +0000 (16:12 +0100)
committerRemita Amine <remitamine@gmail.com>
Sat, 26 May 2018 15:13:54 +0000 (16:13 +0100)
33 files changed:
youtube_dl/extractor/animeondemand.py
youtube_dl/extractor/atresplayer.py
youtube_dl/extractor/bambuser.py
youtube_dl/extractor/crunchyroll.py
youtube_dl/extractor/curiositystream.py
youtube_dl/extractor/dramafever.py
youtube_dl/extractor/facebook.py
youtube_dl/extractor/fc2.py
youtube_dl/extractor/funimation.py
youtube_dl/extractor/gdcvault.py
youtube_dl/extractor/globo.py
youtube_dl/extractor/hidive.py
youtube_dl/extractor/hrti.py
youtube_dl/extractor/iqiyi.py
youtube_dl/extractor/niconico.py
youtube_dl/extractor/noco.py
youtube_dl/extractor/packtpub.py
youtube_dl/extractor/patreon.py
youtube_dl/extractor/pluralsight.py
youtube_dl/extractor/roosterteeth.py
youtube_dl/extractor/safari.py
youtube_dl/extractor/sina.py
youtube_dl/extractor/tennistv.py
youtube_dl/extractor/tubitv.py
youtube_dl/extractor/tumblr.py
youtube_dl/extractor/twitch.py
youtube_dl/extractor/udemy.py
youtube_dl/extractor/vessel.py
youtube_dl/extractor/viki.py
youtube_dl/extractor/vimeo.py
youtube_dl/extractor/vk.py
youtube_dl/extractor/youtube.py
youtube_dl/extractor/zattoo.py

index e4fa72f466c188a318978f750b9af0344d53a980..1fe5d5e56e698728cf17d15b35624c4fe1882798 100644 (file)
@@ -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:
             return
 
index 1a31ebe0820d67df4b768e8102a134b34cfff0c5..ae1c094277251b6bfe26298d3c8dd8dfd741a905 100644 (file)
@@ -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:
             return
 
index 633c57553d9a9e769f726a664e08061217763ced..34f1b3d83614d97aaf3a07794a5672768a0939ef 100644 (file)
@@ -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:
             return
 
index 3efdc8c21dce170691333f8ee297d65c7c6d1e06..311da515df118e23df584641c6533897d96af1b8 100644 (file)
@@ -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:
             return
 
index 8e45923e3da94c8d848f05e4fe71c5a2d189a0e8..35b1e7a34e21b634bc1251e122741d53aade77c5 100644 (file)
@@ -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:
             return
         result = self._download_json(
index ffbd2623d1e5c1707a643931ab36e928fc2d5fc6..ab32ba4ff3eee337e8dfc2c7fa11c755e2b027c4 100644 (file)
@@ -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:
             return
 
index 220ada3a6dd962f16020e811894220298b720dce..0971ce3564f8cc74bec552798dac83737c2e2cb7 100644 (file)
@@ -226,7 +226,7 @@ class FacebookIE(InfoExtractor):
         return urls
 
     def _login(self):
-        (useremail, password) = self._get_login_info()
+        useremail, password = self._get_login_info()
         if useremail is None:
             return
 
index 448647d727159d97b2f940e76136888af1abc64a..435561147feb991cf3595a3a4d71914a5c0154f6 100644 (file)
@@ -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 False
 
index 107f658baf2c393036dd4d2c770c01258e29e1a9..07d01caecfe6a1cc9bde8e23eb8d3955cdeda62c 100644 (file)
@@ -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:
             return
         try:
index f71d9092e5371d5d2c143058ded24cb5f4ca1958..8806dc48a945e7dea5760498f5b2ef570fb419a4 100644 (file)
@@ -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 None
index 81d6d36d325eb0af5c03a6e93536c34ae2da5bce..c2140c36274b0bd0b82a59a81eb35aa6aca9ab9e 100644 (file)
@@ -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 = True
 
     def _real_extract(self, url):
         video_id = self._match_id(url)
index d8f2e682fbb50adf60763443adff8961ff53de9e..39fabe8a55958374f03700e8a653ea86d707dcc9 100644 (file)
@@ -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 = True
 
     def _real_extract(self, url):
         mobj = re.match(self._VALID_URL, url)
index 6424d34ac4acc0f6c01205076cd0e6e25723fc22..9ba1aa7032eb932e325f9e1e40da1e4b583ce322 100644 (file)
@@ -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 cookies
         if username is None or password is None:
             self.raise_login_required()
index fdfa7de9ef05ce5b509f786d99027c6b5deb0bdf..4b081bd469ca084f5ecf47ac38cc97326b011b31 100644 (file)
@@ -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 performed
         if not username:
index df7f528be2d4c8da7cfe826609608754f2f8e088..dbe871f1657e8ace3802704d14dd29f49efadec9 100644 (file)
@@ -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 performed
         if not username:
             return True
index a9f9b10c47b8b9f481a8ab3f88705b1b0e76eb0f..58b371ed7462e7d43f490cfa3b94bee15e35f0f7 100644 (file)
@@ -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:
             return
 
index 8ed3c6347c90a6bfabe18d51e796a2df4737a804..56a2a1083a11275a02031b4233b44c76f2f6d3f8 100644 (file)
@@ -42,7 +42,7 @@ class PacktPubIE(PacktPubBaseIE):
     _TOKEN = None
 
     def _real_initialize(self):
-        (username, password) = self._get_login_info()
+        username, password = self._get_login_info()
         if username is None:
             return
         try:
index d4b1d34ca8486442139409eda90ed95be6c0ffc9..9eb0276795356af12571e98982f35edec490d0ba 100644 (file)
@@ -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:
             return
 
index 3c508c9ca07a24e31970c8583f04a808b041609a..a207ca9cb93a3c839bf9304267d6a5b10d426b5e 100644 (file)
@@ -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:
             return
 
index 8b703800ecbd595c5cb1e188fdb830b5ed1cfa35..857434540d89a41dae80d9b4270e7bd6e6192acb 100644 (file)
@@ -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:
             return
 
index cc6698f882a5859883372b32dc71578ebe37da8a..8a5d48fc2cf0c1021b38f6dbaa1fbb12767aab2a 100644 (file)
@@ -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:
             return
 
index 8fc66732af70f4db5305fdc891c5142afd5c97c7..07b766b4a756f67d855ede90ebf72f0997da7e1d 100644 (file)
@@ -64,7 +64,7 @@ class SinaIE(InfoExtractor):
                 # The video id is in the redirected url
                 self.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')
index 0c6f70784c00cd880fda85d4d830ab478ed77eeb..a586f30ad55a2e060257d86593c793471246d9fc 100644 (file)
@@ -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)
 
index 36f6c16732c7217141e860456788d389eb6bdd94..a51fa6515e6e09d4e2b1794c475f8c251eaf2385 100644 (file)
@@ -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:
             return
         self.report_login()
index 89e6eb5abb3f8f12d36caa5a138c9a293d6fadeb..edbb0aa6944ba82b36415875f2d99e570b3373fc 100644 (file)
@@ -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:
             return
 
index 3ee2af52e8b81f700dd23623ac90ce560bca20e5..e01f11331007d072e6e78272d97fedce599ede4a 100644 (file)
@@ -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:
             return
 
index 0a74a97689752730c986dea4d86a43b170611c56..a7196997ec111cc4e98331d70cfb5df46682fa49 100644 (file)
@@ -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:
             return
 
index 80a643dfe6d6a7a160cb4035b52b9a95b03769cf..31eee0ba72588ce85ad9a5bbe6e296f5a4b455a2 100644 (file)
@@ -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:
             return
         self.report_login()
index ad2a2a4b70fdde18548e4dde62fcf9ccfc264ba4..546de95d8544a540da735a014bffd3ac096e25b6 100644 (file)
@@ -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:
             return
 
index 8dfd8891ce92e4829eb0990a8eea061ce89ed889..3baa2d075543fe951db281e081da8527aeced13c 100644 (file)
@@ -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)
index b50d4f170328728fbfc75b75e5a5ed6dcf281f84..29002b35fc08469c0d39a73cdec2c812869c1c21 100644 (file)
@@ -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:
             return
 
index e4eec7c30829a263230704ac73af1727c9c331d1..379559825bac8cae6e6245e8746181e631fdac2b 100644 (file)
@@ -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 performed
         if username is None:
             if self._LOGIN_REQUIRED and self._downloader.params.get('cookiefile') is None:
index 773073d85be276569c5876719f29ff402a051903..b5a3a071681f127c73050f7368f57a9d97124278 100644 (file)
@@ -24,7 +24,7 @@ class ZattooBaseIE(InfoExtractor):
     _power_guide_hash = None
 
     def _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.'