Yahoo! search interface: Difference between revisions
Content added Content deleted
(add Ruby) |
m (→{{header|Ruby}}: uri package is included in open-uri) |
||
Line 243: | Line 243: | ||
=={{header|Ruby}}== |
=={{header|Ruby}}== |
||
Uses {{libheader|RubyGems}}{{libheader|Hpricot}}to parse the HTML. Someone more skillful than I at XPath or CSS could tighten up the <code>parse_html</code> method. |
Uses {{libheader|RubyGems}}{{libheader|Hpricot}}to parse the HTML. Someone more skillful than I at XPath or CSS could tighten up the <code>parse_html</code> method. |
||
<lang ruby>require 'uri' |
<lang ruby>require 'open-uri' |
||
require 'open-uri' |
|||
require 'rubygems' |
require 'rubygems' |
||
require 'hpricot' |
require 'hpricot' |