Created
April 22, 2015 20:22
-
-
Save getnashty/2e8623a45d4121feb7a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#gem 'capybara' | |
#gem 'poltergeist', '>= 1.6.0' | |
require 'capybara' | |
require 'capybara/poltergeist' | |
include Capybara::DSL | |
Capybara.default_driver = :poltergeist | |
visit "http://www.bing.com/maps/default.aspx?q=waltham+restaurants&mkt=en&FORM=HDRSC4" | |
puts 'sleepy time' | |
sleep(6) | |
puts 'WAKEUP! (ya wanted to)' | |
all('.ypEntity').each do |thing| | |
t1 = thing.find('.ypEntityCntr') | |
title = t1.find('.entityTitle').text | |
puts title | |
end | |
all(".posts .post").each do |post| | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment