Sha256: f97bc0977952bb280e0392ff65911f1c7ad1c2dd618081435bf39628c0f1e1ed
Contents?: true
Size: 732 Bytes
Versions: 1
Compression:
Stored size: 732 Bytes
Contents
module MercuryParser module API module Content # Parse a webpage and return its main content # Returns a MercuryParser::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 [MercuryParser::Article] def parse(url, options = {}) params = { url: url } response = get('', params.merge(options)) MercuryParser::Article.new(response) end end # Content end # API end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mercury_parser-0.0.1 | lib/mercury_parser/api/content.rb |