For this article, Madison Square Garden Entertainment Corp. (NYSE:MSGE) Stock Position Cut by Private Advisor Group LLC - Ticker Report, the text ‘Featured Stories’ and the list of articles after it are all inside the div with itemProp = articleBody.
I want to extract text up to (but not including) ‘Featured Stories’. I’ve been messing around with descendant but can’t figure it out. Is something like this even possible?
strip: //p[contains(.,'Featured Stories')]/descendant::*
strip: //*[contains(text(),'Featured Stories')]/descendant::*