Seiga: fix source uploads not working
This commit is contained in:
@@ -49,10 +49,17 @@ module Sources
|
|||||||
link = page.search("a#illust_link")
|
link = page.search("a#illust_link")
|
||||||
|
|
||||||
if link.any?
|
if link.any?
|
||||||
"http://seiga.nicovideo.jp" + link[0]["href"]
|
image_url = "http://seiga.nicovideo.jp" + link[0]["href"]
|
||||||
|
page = agent.get(image_url) # need to follow this redirect while logged in or it won't work
|
||||||
|
images = page.search("img").select {|x| x["src"] =~ /\/priv\//}
|
||||||
|
if images.any?
|
||||||
|
image_url = "http://lohas.nicoseiga.jp" + images[0]["src"]
|
||||||
|
end
|
||||||
else
|
else
|
||||||
nil
|
image_url = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return image_url
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_tags_from_page(page)
|
def get_tags_from_page(page)
|
||||||
|
|||||||
Reference in New Issue
Block a user