strategies/pixiv.rb: removed unused methods (#3206).

The page count and the moniker are now obtained from the API.
This commit is contained in:
evazion
2017-07-26 18:17:04 -05:00
parent 22980c845a
commit 80e8c9d174

View File

@@ -249,15 +249,6 @@ module Sources
end
end
def get_moniker_from_page(page)
# <a class="tab-feed" href="/stacc/gennmai-226">Feed</a>
stacc_link = page.search("a.tab-feed").first
if not stacc_link.nil?
stacc_link.attr("href").sub(%r!^/stacc/!i, '')
end
end
def get_moniker_from_url
case url
when %r!#{IMG}/img/(#{MONIKER})!i
@@ -310,19 +301,6 @@ module Sources
end
end
def get_page_count_from_page(page)
elements = page.search("ul.meta li").find_all do |node|
node.text =~ /Manga|漫画|複数枚投稿|Multiple images/
end
if elements.any?
elements[0].text =~ /(?:Manga|漫画|複数枚投稿|Multiple images):? (\d+)P/
$1.to_i
else
1
end
end
def normalized_url
"http://www.pixiv.net/member_illust.php?mode=medium&illust_id=#{@illust_id}"
end