use 'cookiedomain' for cookies set by object-config-values

otherwise these cookies would not be picked up by the
_check_cookies() method.
This commit is contained in:
Mike Fährmann
2017-07-22 15:43:35 +02:00
parent 00a23fe208
commit 808f67ba7d
5 changed files with 17 additions and 8 deletions

View File

@@ -18,6 +18,7 @@ class NijieExtractor(AsynchronousExtractor):
category = "nijie"
directory_fmt = ["{category}", "{artist-id}"]
filename_fmt = "{category}_{artist-id}_{image-id}_p{index:>02}.{extension}"
cookiedomain = "nijie.info"
popup_url = "https://nijie.info/view_popup.php?id="
def __init__(self):
@@ -62,7 +63,7 @@ class NijieExtractor(AsynchronousExtractor):
def login(self):
"""Login and obtain session cookie"""
if self._check_cookies(("nemail", "nlogin"), "nijie.info"):
if self._check_cookies(("nemail", "nlogin")):
return
username, password = self.auth_info()
self.session.cookies = self._login_impl(username, password)