Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Ruby AliExpress price fetch example
- # Requires nokogiri (sudo gem install nokogiri)
- # Save and run as ./ruby.rb
- # Written 25.03.2017 by Security XIII
- require 'open-uri'
- require 'nokogiri'
- url = 'http://ru.aliexpress.com/item/6-12Colors-Non-toxic-Crayon-edible-baby-drawing-Supplies-ring-toy-Easy-to-erase-educational-toys/32753968959.html'
- id = 'j-sku-discount-price'
- doc = Nokogiri::HTML(open(url))
- puts doc.css("span[id=#{id}]").inner_text
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement