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

185
Views
obtener className de un componente reutilizable de html

Estoy haciendo un proyecto de raspado web y necesito raspar este sitio para probarlo: https://quotes.toscrape.com/js/

El HTML:
 <div class="quote" itemscope itemtype="http://schema.org/CreativeWork"> <span class="text" itemprop="text">“The world as we have created it is a process of our thinking. It cannot be changed without changing our thinking.”</span> <span>by <small class="author" itemprop="author">Albert Einstein</small> <a href="/author/Albert-Einstein">(about)</a> </span> <div class="tags"> Tags: <meta class="keywords" itemprop="keywords" content="change,deep-thoughts,thinking,world" / > <a class="tag" href="/tag/change/page/1/">change</a> <a class="tag" href="/tag/deep-thoughts/page/1/">deep-thoughts</a> <a class="tag" href="/tag/thinking/page/1/">thinking</a> <a class="tag" href="/tag/world/page/1/">world</a> </div> </div> <div class="quote" itemscope itemtype="http://schema.org/CreativeWork"> <span class="text" itemprop="text">“It is our choices, Harry, that show what we truly are, far more than our abilities.”</span> <span>by <small class="author" itemprop="author">JK Rowling</small> <a href="/author/JK-Rowling">(about)</a> </span> <div class="tags"> Tags: <meta class="keywords" itemprop="keywords" content="abilities,choices" / > <a class="tag" href="/tag/abilities/page/1/">abilities</a> <a class="tag" href="/tag/choices/page/1/">choices</a> </div> </div>.....

Entonces, existe este componente reutilizable con comillas className. Mi pregunta es, ¿cómo detectar automáticamente y obtener el nombre de clase con js?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

No he entendido claramente, pero leí sobre querySelector

en tu caso:

 const element = document.querySelectorAll(".quote")
about 4 years ago · Juan Pablo Isaza Report
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!