hentai foundry: update url for Hentai Foundry tags.
Change the URL used for Hentai Foundry tags from:
https://www.hentai-foundry.com/search/index?query=elf&search_in=keywords
to:
https://www.hentai-foundry.com/pictures/tagged/elf
This commit is contained in:
@@ -36,10 +36,10 @@ module Source
|
|||||||
end
|
end
|
||||||
|
|
||||||
def tags
|
def tags
|
||||||
tags = page&.search(".boxbody [rel='tag']") || []
|
tags = page&.search(".boxbody [rel='tag']").to_a.map(&:text)
|
||||||
|
|
||||||
tags.map do |tag|
|
tags.map do |tag|
|
||||||
[tag.text, URI.join(page_url, tag.attr("href")).to_s]
|
[tag, "https://www.hentai-foundry.com/pictures/tagged/#{CGI.escape(tag)}"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ module Sources
|
|||||||
end
|
end
|
||||||
|
|
||||||
should "get the tags" do
|
should "get the tags" do
|
||||||
assert_equal([["elf", "https://www.hentai-foundry.com/search/index?query=elf&search_in=keywords"]], @image_1.tags)
|
assert_equal([["elf", "https://www.hentai-foundry.com/pictures/tagged/elf"]], @image_1.tags)
|
||||||
assert_equal([["elf", "https://www.hentai-foundry.com/search/index?query=elf&search_in=keywords"]], @image_2.tags)
|
assert_equal([["elf", "https://www.hentai-foundry.com/pictures/tagged/elf"]], @image_2.tags)
|
||||||
end
|
end
|
||||||
|
|
||||||
should "find the correct artist" do
|
should "find the correct artist" do
|
||||||
|
|||||||
Reference in New Issue
Block a user