[extractor/common] Update _get_login_info's comment
[youtube-dl] / youtube_dl / extractor / common.py
index e413799f9a3b4b78ca3cf3fd6908abaaa94c906e..95ea3fca5da50861d9633a2e5dd0c0702f429796 100644 (file)
@@ -683,14 +683,15 @@ class InfoExtractor(object):
     def _get_login_info(self, username_option='username', password_option='password', netrc_machine=None):
         """
         Get the login info as (username, password)
-        It will look in the netrc file using the _NETRC_MACHINE value
+        First look for the manually specified credentials using username_option
+        and password_option as keys in params dictionary. If no such credentials
+        available look in the netrc file using the netrc_machine or _NETRC_MACHINE
+        value.
         If there's no info available, return (None, None)
         """
         if self._downloader is None:
             return (None, None)
 
-        username = None
-        password = None
         downloader_params = self._downloader.params
 
         # Attempt to use provided username and password or .netrc data
@@ -700,7 +701,7 @@ class InfoExtractor(object):
         else:
             username, password = self._get_netrc_login_info(netrc_machine)
 
-        return (username, password)
+        return username, password
 
     def _get_tfa_info(self, note='two-factor verification code'):
         """