diff options
Diffstat (limited to 'gallery_dl/extractor/pixiv.py')
| -rw-r--r-- | gallery_dl/extractor/pixiv.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gallery_dl/extractor/pixiv.py b/gallery_dl/extractor/pixiv.py index a813d0e..8aee058 100644 --- a/gallery_dl/extractor/pixiv.py +++ b/gallery_dl/extractor/pixiv.py @@ -522,6 +522,10 @@ class PixivAppAPI(): @cache(maxage=3600, keyarg=1) def _login_impl(self, username, password): + if not username or not password: + raise exception.AuthenticationError( + "Username and password required") + url = "https://oauth.secure.pixiv.net/auth/token" data = { "client_id": self.client_id, @@ -550,6 +554,7 @@ class PixivAppAPI(): response = self.extractor.request( url, method="POST", headers=headers, data=data, fatal=False) if response.status_code >= 400: + self.log.debug(response.text) raise exception.AuthenticationError() data = response.json()["response"] |
