Ref #52 RSS url detection
This commit is contained in:
@@ -93,7 +93,7 @@ module WebSite
|
||||
|
||||
def homepage_hash
|
||||
unless @homepage_hash
|
||||
@homepage_hash = WebSite.page_hash(self.url)
|
||||
@homepage_hash = WebSite.page_hash(@uri.to_s)
|
||||
end
|
||||
@homepage_hash
|
||||
end
|
||||
@@ -106,4 +106,11 @@ module WebSite
|
||||
end
|
||||
@error_404_hash
|
||||
end
|
||||
|
||||
# Will try to find the rss url in the homepage
|
||||
# Only the first one found iw returned
|
||||
def rss_url
|
||||
homepage_body = Browser.instance.get(@uri.to_s).body
|
||||
homepage_body[%r{<link .* type="application/rss\+xml" .* href="([^"]+)" />}, 1]
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user