Fix deviantart source strategy not working for mature works

This commit is contained in:
Toks
2015-09-06 23:36:34 -04:00
parent 814b4b2236
commit 6f17a664e9

View File

@@ -105,7 +105,17 @@ module Sources
end
def agent
@agent ||= Mechanize.new
@agent ||= begin
mech = Mechanize.new
# This cookie needs to be set to allow viewing of mature works
cookie = Mechanize::Cookie.new("agegate_state", "1")
cookie.domain = ".deviantart.com"
cookie.path = "/"
mech.cookie_jar.add(cookie)
mech
end
end
end
end