Module: Feedzirra::FeedEntryUtilities
- Defined in:
- lib/newscrapi/feedzirra.rb
Instance Method Summary collapse
-
#scrap_content(scrapper = Newscrapi::Scrapper.default, options = {}) ⇒ Object
Scrap the content based on the URL and the existing content and return it.
-
#scrap_content!(scrapper = Newscrapi::Scrapper.default, options = {}) ⇒ Object
Scrap the content or use the existing one and change the feed entry.
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, = {}) scrapper.scrap_content(self.url, ) || 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, = {}) self.content = scrap_content(scrapper, ) end |