Skip to content

railstesh/nokogiri-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nokogiri-script

  • Given HTML: html<div class="images"><img src="/pic.jpg"></div> Using Nokogiri how would you select the src attribute from the image? Show me two different ways to do that correctly the the HTML given.

  • If found HTML was a collection of li tags within a div with class="attr", how would you use Nokogiri to collect that information into one array?

  • Given the following HTML:

<div class="listing">
<div class="row">
<span class="left">Title:</span>
<span class="right">The Well-Grounded Rubyist</span>
</div>
<div class="row">
<span class="left">Author:</span>
<span class="right">David A. Black</span>
</div>
<div class="row">
<span class="left">Price:</span>
<span class="right">$34.99</span>
</div>
<div class="row">
<span class="left">Description:</span>
<span class="right">A great book for Rubyists</span>
</div>
<div class="row">
<span class="left">Seller:</span>
<span class="right">Ruby Scholar</span>
</div>
</div>

Please collect all of the data presented into a key-value store. Please include code and the output.

About

Nokogiri scraper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages