Skip to content

Instantly share code, notes, and snippets.

@bascht
Created May 25, 2011 18:10
Show Gist options
  • Save bascht/991526 to your computer and use it in GitHub Desktop.
Save bascht/991526 to your computer and use it in GitHub Desktop.
Pizza picker
require 'nokogiri'
require 'open-uri'
doc = Nokogiri::HTML(open('http://pizza.de/order/world-of-pizza/02/framek030.htm'))
menu = doc.xpath('//td[@id="framek"]//div[2]/div/div[1]/div[1]/b').to_a
puts "# Our Menu:\n * #{menu * ", \n * "}"
puts
puts "I'd recommend *#{menu.sample.content}*."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment