Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

226
Views
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&amp;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.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!