Estoy haciendo un proyecto de raspado web y necesito raspar este sitio para probarlo: https://quotes.toscrape.com/js/
<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?
No he entendido claramente, pero leí sobre querySelector
en tu caso:
const element = document.querySelectorAll(".quote")