Created
April 8, 2016 10:05
-
-
Save rakuishi/d6e10c6fee1dbe1d59b9830f11dcdfaf to your computer and use it in GitHub Desktop.
This file contains hidden or 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
require 'nokogiri' | |
require 'open-uri' | |
doc = Nokogiri::HTML(open('http://www.onsen.ag')) | |
doc.xpath('//section[@id="movieList"]//div[@class="listWrap"]//ul[@class="clr"]//li').each do |node| | |
p node.xpath('h4[@class="listItem"]').inner_text | |
p node.xpath('p[@class="thumbnail listItem"]//img').attribute('src').text | |
break | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment