pixiv source fix
This commit is contained in:
@@ -25,18 +25,17 @@ module Sources
|
|||||||
protected
|
protected
|
||||||
|
|
||||||
def get_profile_from_page(page)
|
def get_profile_from_page(page)
|
||||||
links = page.search("div.profile_area a.avatar_m").find_all do |node|
|
profile_url = page.search("a.user-link").first
|
||||||
node["href"] =~ /member\.php/
|
if profile_url
|
||||||
|
profile_url = profile_link["href"]
|
||||||
|
end
|
||||||
|
|
||||||
|
artist_name = page.search("h1.user").first
|
||||||
|
if artist_name
|
||||||
|
artist_name = artist_name.inner_text
|
||||||
end
|
end
|
||||||
|
|
||||||
if links.any?
|
return [artist_name, profile_url]
|
||||||
profile_url = "http://www.pixiv.net" + links[0]["href"]
|
|
||||||
children = links[0].children
|
|
||||||
artist = children[0]["alt"]
|
|
||||||
return [artist, profile_url]
|
|
||||||
else
|
|
||||||
return []
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_image_url_from_page(page)
|
def get_image_url_from_page(page)
|
||||||
|
|||||||
Reference in New Issue
Block a user