Module: Feedzirra::FeedEntryUtilities
- Defined in:
- lib/content_scrapper/feedzirra.rb
Instance Method Summary collapse
-
#scrap_content(scrapper = ContentScrapper.default, options = {}) ⇒ Object
Scrap the content based on the URL and the existing content and return it.
-
#scrap_content!(scrapper = ContentScrapper.default, options = {}) ⇒ Object
Scrap the content or use the existing one and change the feed entry.
Instance Method Details
#scrap_content(scrapper = ContentScrapper.default, options = {}) ⇒ Object
Scrap the content based on the URL and the existing content and return it
9 10 11 |
# File 'lib/content_scrapper/feedzirra.rb', line 9 def scrap_content(scrapper = ContentScrapper.default, = {}) scrapper.scrap_content(self.url, ) || self.content.to_s end |
#scrap_content!(scrapper = ContentScrapper.default, options = {}) ⇒ Object
Scrap the content or use the existing one and change the feed entry
14 15 16 |
# File 'lib/content_scrapper/feedzirra.rb', line 14 def scrap_content!(scrapper = ContentScrapper.default, = {}) self.content = scrap_content(scrapper, ) end |