Extracting from hidden span

Hi

Ive just started using the Chrome plugin and im trying to extract an address from the following field:

<div class="hotelAddress" itemprop="address" itemscope="" itemtype="http://schema.org/PostalAddress">
9 - 12 Gloucester Road , Edinburgh, EM36GF, UK                                
  <span itemprop="streetAddress" class="hidden">9 - 12 Gloucester Road </span>
  <span itemprop="addressLocality" class="hidden">Edinburgh</span>
  <span itemprop="addressRegion" class="hidden"></span>
  <span itemprop="postalCode" class="hidden">EM36GF</span>

At the moment if I use div[itemprop='address'] the result is the address extracted twice (once from div and once from the hidden spans.

How do I either ignore the spans and just extract the text from the parent div. Or, how do I access the hidden spans so I can extract something like: Street = itemprop='streetAddress', Town = itemprop='addressLocality' etc...

Thanks

James

As the spans are all child of the div, you cannot avoid extracting their text too if you want to extract the parent div.

If you only need the span text, it would be much easier 'cos you can combine multiple attributes for a selector, e.g.:

span[itemprop='streetAddress'][class='hidden']

Ref: https://www.w3schools.com/cssref/css_selectors.asp

Thats great, many thanks.