Merge pull request #3019 from evazion/fix-pawoo-sources

Fix pawoo sources after upload.
This commit is contained in:
Albert Yi
2017-05-03 15:33:53 -07:00
committed by GitHub

View File

@@ -130,13 +130,18 @@ module Downloads
def fix_twitter_sources(src)
if src =~ %r!^https?://pbs\.twimg\.com/! && original_source =~ %r!^https?://twitter\.com/!
original_source
elsif src =~ %r!^https?://img\.pawoo\.net/! && original_source =~ %r!^https?://pawoo\.net/!
original_source
else
src
end
end
def set_source_to_referer(src)
if Sources::Strategies::Nijie.url_match?(src) || Sources::Strategies::Twitter.url_match?(src) || Sources::Strategies::Tumblr.url_match?(src)
if Sources::Strategies::Nijie.url_match?(src) ||
Sources::Strategies::Twitter.url_match?(src) ||
Sources::Strategies::Tumblr.url_match?(src) ||
Sources::Strategies::Pawoo.url_match?(src)
strategy = Sources::Site.new(src, :referer_url => options[:referer_url])
strategy.referer_url
else