summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/nijie.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2023-12-25 01:27:47 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2023-12-25 01:27:47 -0500
commit4d7a4f1ecef2c96269f3590335d2834ebcdd50bf (patch)
treec66c0b829ed69c7424befddc193eaa51054b1410 /gallery_dl/extractor/nijie.py
parent30dee4697019389ef29458b2e3931adc976389b2 (diff)
New upstream version 1.26.5.upstream/1.26.5
Diffstat (limited to 'gallery_dl/extractor/nijie.py')
-rw-r--r--gallery_dl/extractor/nijie.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/gallery_dl/extractor/nijie.py b/gallery_dl/extractor/nijie.py
index 54f2942..57c3118 100644
--- a/gallery_dl/extractor/nijie.py
+++ b/gallery_dl/extractor/nijie.py
@@ -124,15 +124,15 @@ class NijieExtractor(AsynchronousMixin, BaseExtractor):
return
username, password = self._get_auth_info()
- self.cookies_update(self._login_impl(username, password))
+ if username:
+ return self.cookies_update(self._login_impl(username, password))
- @cache(maxage=90*24*3600, keyarg=1)
- def _login_impl(self, username, password):
- if not username or not password:
- raise exception.AuthenticationError(
- "Username and password required")
+ raise exception.AuthenticationError("Username and password required")
+ @cache(maxage=90*86400, keyarg=1)
+ def _login_impl(self, username, password):
self.log.info("Logging in as %s", username)
+
url = "{}/login_int.php".format(self.root)
data = {"email": username, "password": password, "save": "on"}