Scrape text inside quotation marks?

How do I scrape the text inside the quotation marks? I've never figured that out.

Here is what I have tried in the selector:

  • span:contains('Product Type')
  • span[class="specification-info-header"] #text
  • span:contains('Product Type') + (#text)
  • li:contains('hand tufted') - this one worked on this specific one but it doesn't work on a different item. I want any text which is there with the span Product Type.

Thanks for any guidance on this!
-Jenny

Share you sitemap and we can have a go.

The :has selector should work great for this. It's an unusual selector which I only learned about earlier this year.

li:has(span[class='specification-info-header'])
Or
li:has(span:contains('Product Type'))

Ref: Did You Know About the :has CSS Selector? | CSS-Tricks