i use importxml to scrap information from website. I need title (36%) in span but i don't know how to program this because is not between span class but directly inside.
<span title="36%" > </span>
thanks
CodePudding user response:
scrap the source code... try:
=REGEXEXTRACT(QUERY(FLATTEN(IMPORTDATA("url_here"));
"where Col1 contains 'spr0 spr_bar3'"; 0); ".*(\d %).*")
in theory, this should work. in reality - you did not provide enough information in your question, so proposed solution cant be tested
CodePudding user response:
thanks for your answer. i have tested bud not the good result. th eproblem is multi span with identic class...
page example to scrap "https://www.zonebourse.com/cours/action/DERICHEBOURG-4680/notations/" . I want to scrap :
- "Révision Bénéfices 12m" with 97% -->
<span title="97%" > </span>
- and "Révision CA 12m " with 91% -->
<span title="91%" > </span>
thanks