Skip to content

Instantly share code, notes, and snippets.

@cesardeazevedo
Created November 10, 2015 21:46
Show Gist options
  • Save cesardeazevedo/82c55d3980a8280d1762 to your computer and use it in GitHub Desktop.
Save cesardeazevedo/82c55d3980a8280d1762 to your computer and use it in GitHub Desktop.
vivotransfer value
require 'Nokogiri'
require 'open-uri'
@doc = Nokogiri::HTML(open('http://www.vivotransfer.com/'))
@content = @doc.xpath('//p[@class = "valor"]').text
puts @content # => *R$ 5.550
puts @content.scan(/\d/).join # => 5550
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment