hentai foundry: replace HTTParty with Danbooru::Http.
This commit is contained in:
@@ -64,11 +64,10 @@ module Sources
|
|||||||
def page
|
def page
|
||||||
return nil if page_url.blank?
|
return nil if page_url.blank?
|
||||||
|
|
||||||
doc = Cache.get("hentai-foundry:#{page_url}", 1.minute) do
|
response = Danbooru::Http.new.cache(1.minute).get("#{page_url}?enterAgree=1")
|
||||||
HTTParty.get("#{page_url}?enterAgree=1").body
|
return nil unless response.status == 200
|
||||||
end
|
|
||||||
|
|
||||||
Nokogiri::HTML(doc)
|
response.parse
|
||||||
end
|
end
|
||||||
|
|
||||||
def tags
|
def tags
|
||||||
|
|||||||
Reference in New Issue
Block a user