title: VBA Excel Scraping
body: <p>I am getting started with trying to learn about scraping. I got this page that is behind a login and I remember reading that you should not try to do the (1), (2) or (3) thing after get element by tagname. But that you should rather get something more unique like a Classname or ID. But can someone please tell me why  </p>
  
  <p>This the GetTag <strong>works</strong> and</p>
  
  <pre><code>Dim Companyname As String
  Companyname = ie.document.getElementsByTagName("span")(1).innertext
  </code></pre>
  
  <p>This GetClass <strong>do not work</strong></p>
  
  <pre><code>Dim Companyname As String
  Companyname = ie.document.getElementsByClassName("account-website-name").innertext
  </code></pre>
  
  <p>This is the text that I am scraping</p>
  
  <pre><code>&lt;span class="account-website-name" data-journey-name="true"&gt;Dwellington Journey&lt;/span&gt;
  </code></pre>