'With Cheerio, how do I select a node which has a data-some-attribute but with no value?
I'm using Cheerio, and trying to select
<div data-featured-img="" class="relative w-full" style="padding-bottom: 55.25%;">
<iframe title="sometitle" src="https://www.youtube.com/embed/avid123?start=3720&feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe>
</div>
but I've tried to use the jQuery way, which would be jQuery("div[data-featured-img]")[0] but that doesn't work with Cheerio. How can I do this? I tried Jquery way bc I heard Jquery and Cheerio have similar selectors.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
