moebooru: fetch tags (#3911).

This commit is contained in:
evazion
2018-10-06 00:58:22 -05:00
parent 7eee77d520
commit 864349dc7b
2 changed files with 34 additions and 15 deletions

View File

@@ -76,6 +76,12 @@ module Sources
nil
end
def tags
api_response[:tags].to_s.split.map do |tag|
[tag.tr("_", " "), "https://#{site_name}/post?tags=#{CGI.escape(tag)}"]
end
end
def headers
{ "Referer" => "http://#{site_name}" }
end