1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 10:42:34 +01:00

[nijie] change 'email'-parameter to 'username'

This commit is contained in:
Mike Fährmann 2016-07-24 22:22:49 +02:00
parent 794fa22762
commit d01b21c6c8
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -35,7 +35,7 @@ class NijieUserExtractor(AsynchronousExtractor):
def items(self):
self.session.cookies = self.login(
config.interpolate(("extractor", self.category, "email")),
config.interpolate(("extractor", self.category, "username")),
config.interpolate(("extractor", self.category, "password"))
)
data = self.get_job_metadata()
@ -70,9 +70,9 @@ class NijieUserExtractor(AsynchronousExtractor):
})
@cache(maxage=30*24*60*60, keyarg=1)
def login(self, email, password):
def login(self, username, password):
"""Login and obtain session cookie"""
params = {"email": email, "password": password}
params = {"email": username, "password": password}
page = self.session.post("https://nijie.info/login_int.php", data=params).text
if "//nijie.info/login.php" in page:
raise exception.AuthenticationError()