diff options
| author | 2023-12-25 01:27:47 -0500 | |
|---|---|---|
| committer | 2023-12-25 01:27:47 -0500 | |
| commit | 4d7a4f1ecef2c96269f3590335d2834ebcdd50bf (patch) | |
| tree | c66c0b829ed69c7424befddc193eaa51054b1410 /gallery_dl/extractor/nijie.py | |
| parent | 30dee4697019389ef29458b2e3931adc976389b2 (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.py | 12 |
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"} |
