Trouble using Cheerio

I’m trying to do a little web scraping but I’m new to node.js etc. However I’ve worked thru several examples and all seems fine but I have an issue with cheerio. All the examples I’ve seen are very simplistic. Could someone explain what would be the syntax to return the “Price” from this element?

<div class="product-details__product-price ec-price-item" itemprop="price" content="1279.95"><meta itemprop="priceCurrency" content="GBP"><span class="details-product-price__value ec-price-item notranslate" simcase-converted-currency="GBP" simcase-original-price="£1,279.95" simcase-converted-price="£1,279.95">£1,279.95</span></div>\\`

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Thanks for your help!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.