Sha256: 8f1bdb38d64ad37f5fdd2775f99a3ec474ecf921a88039ff5b5b7681fa041dcb
Contents?: true
Size: 436 Bytes
Versions: 1
Compression:
Stored size: 436 Bytes
Contents
require 'nokogiri' require 'httpclient' class Maxwell module Converter def self.execute(url) client = HTTPClient.new( default_header: { "User-Agent" => "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36" } ) html = begin client.get_content(url) rescue "" end Nokogiri::HTML(html) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
maxwell-0.2.0 | lib/maxwell/converter.rb |