title: Extracting url with capybara
body: <p>I have a page with multiple entries of student names, each student having an url that leads to his chart. The html looks like this:</p>
  
  <pre><code>&lt;div class="student_name"&gt;
    &lt;a target="_blank" data-tn-element="grade-result-link[]" data-tn-link 
     href="/johndoe/b89db3308ddaaed2?sp=0" rel="nofollow" class="student_link"
     itemprop="url"&gt;John Doe&lt;/a&gt;  
     &lt;span class="graduated"&gt; - Graduated 2013&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to create a list with only the urls of each student on the page but all I end up with is the name of the student. I'm using capybara with webkit and my code resembles this:</p>
  
  <pre><code>results =  page.all('div.student_name').map do |item|
     puts(item.text)
  end
  </code></pre>
  
  <p>How do I phrase this so I can only extract the embedded (relative) url in the href?</p>
  
  <p>Ed</p>