* Fix for Pixiv changes
* Fix for artist/wiki pages for -names
This commit is contained in:
@@ -9,6 +9,8 @@ module PostSets
|
||||
|
||||
def posts
|
||||
::Post.tag_match(@artist.name)
|
||||
rescue ::Post::SearchError
|
||||
::Post.where("false")
|
||||
end
|
||||
|
||||
def presenter
|
||||
|
||||
@@ -29,6 +29,8 @@ module PostSets
|
||||
end
|
||||
|
||||
@posts ||= ::Post.tag_match(tag_string).paginate(page)
|
||||
rescue ::Post::SearchError
|
||||
@posts = ::Post.where("false")
|
||||
end
|
||||
|
||||
def has_artist?
|
||||
|
||||
@@ -42,7 +42,7 @@ module Sources
|
||||
def get_image_url_from_page(page)
|
||||
meta = page.search("meta[property=\"og:image\"]").first
|
||||
if meta
|
||||
meta.attr("content").sub(/_m\./, ".")
|
||||
meta.attr("content").sub(/_[ms]\./, ".")
|
||||
else
|
||||
nil
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user