Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67527

Get tag that is used before text in html with cheerio

$
0
0

I have this problem, where I have to scrape website and look for text "Goals" and return tag text before it. I use cheerio in Node.js. The code I have to scrape looks like this:

<label>19</label>
Matches
<label>10</label>
Goals

And I need <label>10</label> so I can save "10" to variable and use things with it


Viewing all articles
Browse latest Browse all 67527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>