title: Extract img ALT attribute from a link
body: <p>I have been trying to extract data from a alt=&quot;&quot; string, but I keep getting it wrong.</p>
  <p>The website is: <a href="https://www.morningstar.pt/pt/funds/snapshot/snapshot.aspx?id=F00000ZK96&amp;tab=2" rel="nofollow noreferrer">https://www.morningstar.pt/pt/funds/snapshot/snapshot.aspx?id=F00000ZK96&amp;tab=2</a></p>
  <p>and the data is the morningstar rating, which currently is 2 (and I want it to refresh automatically).
  The problem is that this is not expressed as text but as an image.
  The lines are:</p>
  <pre>
       td class="value text">
       img class="starsImg" src="https://www.morningstar.pt/includes/images/2stars.gif" alt="2 star">
  </pre>
  <p>I want to extract the &quot;2 star&quot;, but have failed for hours with a lot of different approaches...
  My code is currently as following (still incomplete):</p>
  <pre><code>Sub Get_Web_Data()
  
  Dim request As Object
  Dim response As String
  Dim html As New HTMLDocument
  Dim website As String
  Dim rating As Variant
  
  website = &quot;https://www.morningstar.pt/pt/funds/snapshot/snapshot.aspx?id=F00000ZK96&amp;tab=2&quot;
  
  Set request = CreateObject(&quot;MSXML2.XMLHTTP&quot;)
  
  request.Open &quot;GET&quot;, website, False
  
  request.setRequestHeader &quot;If-Modified-Since&quot;, &quot;Sat, 1 Jan 2000 00:00:00 GMT&quot;
  
  request.send
  
  response = StrConv(request.responseBody, vbUnicode)
  
  html.body.innerHTML = response
  
  rating = html.getElementsByClassName(&quot;value text&quot;)       --------&gt; Incomplete
  
  Range(&quot;A1&quot;).Value = rating
  
  End Sub
  </code></pre>
  <p>Do you have any ideas as to what I'm doing wrong?
  Thank you in advance.</p>