Module: MercuryWebParser::API::Content

Included in:
Client
Defined in:
lib/mercury_web_parser/api/content.rb

Instance Method Summary collapse

Instance Method Details

#parse(url) ⇒ MercuryWebParser::Article

Parse a webpage and return its main content Returns a MercuryWebParser::Article object

Parameters:

  • url (String)

    The URL of an article to return the content for

Returns:



9
10
11
12
13
# File 'lib/mercury_web_parser/api/content.rb', line 9

def parse(url)
  response = get('', url: url)

  MercuryWebParser::Article.new(response)
end