fix pixiv source
This commit is contained in:
@@ -49,7 +49,9 @@ module Sources
|
|||||||
end
|
end
|
||||||
|
|
||||||
def get_tags_from_page(page)
|
def get_tags_from_page(page)
|
||||||
links = page.search("span#tags a").find_all do |node|
|
# puts page.root.to_xhtml
|
||||||
|
|
||||||
|
links = page.search("ul.tags a").find_all do |node|
|
||||||
node["href"] =~ /tags\.php/
|
node["href"] =~ /tags\.php/
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ module Sources
|
|||||||
assert(first_tag[0] =~ /./)
|
assert(first_tag[0] =~ /./)
|
||||||
assert(first_tag[1] =~ /tags\.php\?tag=/)
|
assert(first_tag[1] =~ /tags\.php\?tag=/)
|
||||||
end
|
end
|
||||||
|
|
||||||
should "convert a page into a json representation" do
|
should "convert a page into a json representation" do
|
||||||
assert_nothing_raised do
|
assert_nothing_raised do
|
||||||
@site.to_json
|
@site.to_json
|
||||||
|
|||||||
Reference in New Issue
Block a user