diff options
| author | 2020-12-30 18:41:48 -0500 | |
|---|---|---|
| committer | 2020-12-30 18:41:48 -0500 | |
| commit | 87a5aa088ce33a1196ff409b76a9ea8233bdc634 (patch) | |
| tree | 7e6155edcc5dd12e40b47ad814b3bc69e65c52fc /gallery_dl/extractor/pixiv.py | |
| parent | 8f7c87a2697113134c311aaeafd9c919555a2741 (diff) | |
New upstream version 1.16.1.upstream/1.16.1
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"] |
