This commit is contained in:
albert
2013-03-10 16:56:04 -04:00
parent 6b02826405
commit 43177cbad8
4 changed files with 14 additions and 2 deletions

View File

@@ -33,6 +33,10 @@ module Sources
end
end
def referer_url(template)
template.params[:ref] || template.params[:url]
end
protected
def agent
raise NotImplementedError

View File

@@ -5,6 +5,14 @@ module Sources
url =~ /^https?:\/\/(?:\w+\.)?pixiv\.net/
end
def referer_url(template)
if template.params[:ref] =~ /pixiv\.net\/member_illust/ && template.params[:ref] !~ /mode=manga/
template.params[:ref]
else
template.params[:url]
end
end
def site_name
"Pixiv"
end