nijie: fetch artist commentary.

This commit is contained in:
evazion
2017-06-20 14:55:46 -05:00
parent 05f7226fdd
commit 25e7db860a
2 changed files with 16 additions and 0 deletions

View File

@@ -39,10 +39,18 @@ module Sources
@artist_name, @profile_url = get_profile_from_page(page)
@image_url = get_image_url_from_page(page)
@tags = get_tags_from_page(page)
@artist_commentary_title, @artist_commentary_desc = get_commentary_from_page(page)
end
protected
def get_commentary_from_page(page)
title = page.search("h2.illust_title").text
desc = page.search('meta[property="og:description"]').attr("content").value
[title, desc]
end
def get_profile_from_page(page)
links = page.search("a.name")