fix bug with source::site

This commit is contained in:
r888888888
2017-11-17 17:26:33 -08:00
parent c0ddf266fc
commit 3c524aa5e6
6 changed files with 10 additions and 13 deletions

View File

@@ -17,16 +17,14 @@ module Sources
end
def initialize(url, referer_url: nil)
@url = url
Site.strategies.each do |strategy|
if strategy.url_match?(url) || strategy.url_match?(referer_url)
@strategy = strategy.new(url, referer_url)
break
return
end
raise NoStrategyError.new
end
raise NoStrategyError.new
end
def referer_url