title: Parsing html using lxml.html
body: <p>I'm developing a Python scraper at scraperwiki.com and I need to parse a html page that containt the following:</p>
  
  <pre><code>&lt;div class="items"&gt;
    &lt;div class="item"&gt;
         ItemLine1 ItemLine1 ItemLine1
         &lt;br&gt; 
         ItemLine2 ItemLine2 ItemLine2
   &lt;/div&gt;
   &lt;br&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>What I'm doing now is:</p>
  
  <pre><code>import scraperwiki
  import lxml.html
  
  #.......................
  raw_string = lxml.html.fromstring(scraperwiki.scrape(url_to_scrape))
  my_line = ((raw_string.cssselect("div.items div.item")[0]).text)
  print (my_line)
  </code></pre>
  
  <p>and it prints <code>ItemLine1 ItemLine1 ItemLine1</code> only. When I change [0] to [1] it throws an exception.</p>
  
  <p>How do I scrape that? Should I use xpath?</p>