nijie: fix exception in login process.

Fix an exception when we can't find the 'url' field in the login form
because we're rate limited by Nijie and couldn't scrape the login page.
This commit is contained in:
evazion
2022-02-12 17:26:25 -06:00
parent 5bb64596cb
commit d6f7725a1e

View File

@@ -251,7 +251,7 @@ module Sources
form = {
email: Danbooru.config.nijie_login,
password: Danbooru.config.nijie_password,
url: login_page.at("input[name='url']")["value"],
url: login_page.at("input[name='url']")&.fetch("value"),
save: "on",
ticket: ""
}