Fix for scraping the manga page count.

The string for the page count has changed. It now looks like "複数枚投稿 3P"
on all Pixiv posts I've checked.
This commit is contained in:
evazion
2014-10-03 20:34:03 -05:00
parent 4b9605075b
commit 74c116ffb7

View File

@@ -87,11 +87,11 @@ module Sources
def get_page_count_from_page(page)
elements = page.search("ul.meta li").find_all do |node|
node.text =~ /Manga|漫画/
node.text =~ /Manga|漫画|複数枚投稿/
end
if elements.any?
elements[0].text =~ /(?:Manga|漫画) (\d+)P/
elements[0].text =~ /(?:Manga|漫画|複数枚投稿) (\d+)P/
$1.to_i
else
1