fix tests

This commit is contained in:
r888888888
2016-05-27 15:34:55 -07:00
parent 2dfc6d92e4
commit 58aa5c6d66
98 changed files with 42782 additions and 71709 deletions

View File

@@ -13,7 +13,7 @@ class PixivWebAgent
cookie.path = "/"
mech.cookie_jar.add(cookie)
else
mech.get("https://www.pixiv.net") do |page|
mech.get("http://www.pixiv.net/member_illust.php?mode=medium&illust_id=18557054&lang=jp") do |page|
page.form_with(:action => "https://www.pixiv.net/login.php") do |form|
form['pixiv_id'] = Danbooru.config.pixiv_login
form['pass'] = Danbooru.config.pixiv_password

View File

@@ -296,11 +296,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|漫画|複数枚投稿|Multiple images/
end
if elements.any?
elements[0].text =~ /(?:Manga|漫画|複数枚投稿) (\d+)P/
elements[0].text =~ /(?:Manga|漫画|複数枚投稿|Multiple images):? (\d+)P/
$1.to_i
else
1