Scrapy XPath - Can't get text within span
<p>I'm trying to reach the address information on a site. Here's an example of my code:</p>

<pre><code>companytype_list = sel.xpath('''.//li[@class="type"]/p/text()''').extract()
headquarters_list = sel.xpath('''.//li[@class="vcard hq"]/p/span[3]/text()''').extract()
companysize_list = sel.xpath('''.//li[@class="company-size"]/p/text()''').extract()
</code></pre>

<p>And here's an example of how addresses are formatted on the site:</p>

<pre><code>&lt;li class="type"&gt;
    &lt;h4&gt;Type&lt;/h4&gt;
    &lt;p&gt;
        Privately Held
    &lt;/p&gt;
&lt;/li&gt;
&lt;li class="vcard hq"&gt;
    &lt;h4&gt;Headquarters&lt;/h4&gt;
    &lt;p class="adr" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"&gt;
        &lt;span class="street-address" itemprop="streetAddress"&gt;Kornhamnstorg 49&lt;/span&gt;
        &lt;span class="street-address" itemprop="streetAddress"&gt;&lt;/span&gt;
        &lt;span class="locality" itemprop="addressLocality"&gt;Stockholm,&lt;/span&gt;
        &lt;abbr class="region" title="Stockholm" itemprop="addressRegion"&gt;Stockholm&lt;/abbr&gt;
        &lt;span class="postal-code" itemprop="postalCode"&gt;S-11127&lt;/span&gt;
        &lt;span class="country-name" itemprop="addressCountry"&gt;Sweden&lt;/span&gt;
    &lt;/p&gt;
&lt;/li&gt;
&lt;li class="company-size"&gt;
    &lt;h4&gt;Company Size&lt;/h4&gt;
    &lt;p&gt;
        11-50 employees
    &lt;/p&gt;
</code></pre>

<p>But when I run the scrapy script I get an <code>IndexError: list index out of range</code> for the address (vcard hq). I've tried to rewrite the code to get the data but it does not work. The rest of the spider works fine. Am I missing something?</p>