class Procurator
Constants
- VERSION
Public Instance Methods
get_page_html(link)
click to toggle source
# File lib/procurator.rb, line 5 def get_page_html link agent = Mechanize.new page = agent.get(link) agent.shutdown return page end
search(link, tags)
click to toggle source
# File lib/procurator.rb, line 13 def search link, tags html = get_page_html link result = Hash.new tags.each do |t| begin result[t[0]] = html.search(t[1]).to_s rescue => ex result[t[0]] = "Nokogiri parsing error" end end result end