Sha256: b6d71ac06a184eb1f69d4e2f7b06568524cc1560e3cea918376063454b26374d
Contents?: true
Size: 748 Bytes
Versions: 2
Compression:
Stored size: 748 Bytes
Contents
module ReadabilityParser module API module Content # Parse a webpage and return its main content # Returns a ReadabilityParser::Article object # # Optionally pass the ID of an article as `id => "id"` in `options` to return the content for a specific DOM node # You can also pass a `max_pages` integer to set the maximum number of pages to parse and combine. Default is 25. # # @param url [String] The URL of an article to return the content for # @return [ReadabilityParser::Article] def parse(url, options = {}) params = { url: url } response = get('', params.merge(options)) ReadabilityParser::Article.new(response) end end # Content end # API end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
readability_parser-0.0.5 | lib/readability_parser/api/content.rb |
readability_parser-0.0.4 | lib/readability_parser/api/content.rb |