Skip to content

Instantly share code, notes, and snippets.

Created January 18, 2015 12:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5a807cd9a19dcbcd49f0 to your computer and use it in GitHub Desktop.
Save anonymous/5a807cd9a19dcbcd49f0 to your computer and use it in GitHub Desktop.
require 'open-uri'
require 'nokogiri'
require 'sequel'
require 'mysql2'
url_desc = "http://descontos.pt/"
dat_desc = Nokogiri::HTML(open(url_desc))
titu = dat_desc.at_css('.titulo').text
DB = Sequel.mysql2('patinhas', :user => 'patinhas', :password => 'passtemp', :host => 'localhost')
dataset.insert(:name => 'titu')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment