Skip to content

Instantly share code, notes, and snippets.

@oogali
Last active September 26, 2015 21:37
Show Gist options
  • Select an option

  • Save oogali/1162755 to your computer and use it in GitHub Desktop.

Select an option

Save oogali/1162755 to your computer and use it in GitHub Desktop.
Engadget front page headlines
#!/usr/bin/ruby
require 'rubygems'
require 'nokogiri'
require 'open-uri'
document = Nokogiri::HTML open('http://www.engadget.com')
document.xpath('//div[@class="headline"]//a[not(@class)]').each do |topic|
puts topic.text
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment