Module: Feedzirra::FeedEntryUtilities

Defined in:
lib/newscrapi/feedzirra.rb

Instance Method Summary collapse

Instance Method Details

#scrap_content(scrapper = Newscrapi::Scrapper.default, options = {}) ⇒ Object

Scrap the content based on the URL and the existing content and return it



8
9
10
# File 'lib/newscrapi/feedzirra.rb', line 8

def scrap_content(scrapper = Newscrapi::Scrapper.default, options = {})
  scrapper.scrap_content(self.url, options) || self.content.to_s
end

#scrap_content!(scrapper = Newscrapi::Scrapper.default, options = {}) ⇒ Object

Scrap the content or use the existing one and change the feed entry



13
14
15
# File 'lib/newscrapi/feedzirra.rb', line 13

def scrap_content!(scrapper = Newscrapi::Scrapper.default, options = {})
  self.content = scrap_content(scrapper, options)
end