summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/nijie.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/extractor/nijie.py')
-rw-r--r--gallery_dl/extractor/nijie.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/gallery_dl/extractor/nijie.py b/gallery_dl/extractor/nijie.py
index 2394acf..e558513 100644
--- a/gallery_dl/extractor/nijie.py
+++ b/gallery_dl/extractor/nijie.py
@@ -100,6 +100,10 @@ class NijieExtractor(AsynchronousMixin, Extractor):
@cache(maxage=150*24*3600, keyarg=1)
def _login_impl(self, username, password):
+ if not username or not password:
+ raise exception.AuthenticationError(
+ "Username and password required")
+
self.log.info("Logging in as %s", username)
url = "{}/login_int.php".format(self.root)
data = {"email": username, "password": password, "save": "on"}