title: Edit 14 day weather forecast Excel VBA to include precipitation
body: <p>I found the code below which works nicely and I think I can repurpose it for my needs, but does not include the precipitation. I'm relatively new to HTML so having trouble understanding what each line of code's purpose is. I've gone to the website and looked at the elements and console but can't find &quot;p[data-testid='wxPhrase']&quot; or the word 'children' or 'child'.</p>
  <p>I presumed precipitation was just another child so tried adding lines like these after editing the column headers in the first sub:</p>
  <pre><code>Results(r + 1, 3) = Children(r).FirstChild.innerText 
  
  Results(r + 1, 4) = Children(r).PreviousSibling.PreviousSibling.PreviousSibling.FirstChild.innerText
  </code></pre>
  <p>but it gives Run-time error '438': Object doesn't support this property or method. I appreciate very much some help and education. Thanks, in advance!</p>
  <pre><code>Sub MiamiWeather()
  Dim Data As Variant
  Data = MiamiWeatherData
  
  Range(&quot;A1:B1&quot;).Value = Array(&quot;Date&quot;, &quot;Temperature&quot;)
  Range(&quot;A2&quot;).Resize(UBound(Data), 2).Value = Data
      
  End Sub
  
  Function MiamiWeatherData()
      Const URL = &quot;https://weather.com/weather/tenday/l/3881cd527264bc7c99b6b541473c0085e75aa026b6bd99658c56ad9bb55bd96e&quot;
      Dim responseText As String
      With CreateObject(&quot;MSXML2.XMLHTTP&quot;)
          .Open &quot;GET&quot;, URL, False
          .send
      responseText = .responseText
  End With
  
  Dim Document As HTMLDocument
  Set Document = CreateObject(&quot;HTMLFILE&quot;)
  Document.body.innerHTML = responseText
  
  Dim Children As IHTMLDOMChildrenCollection
  Set Children = Document.querySelectorAll(&quot;p[data-testid='wxPhrase']&quot;)
  Dim Results As Variant
  ReDim Results(1 To Children.Length, 1 To 2)
  Dim r As Long
  
  For r = 0 To Children.Length - 1
      Results(r + 1, 1) = Children(r).PreviousSibling.PreviousSibling.FirstChild.innerText
      Results(r + 1, 2) = Children(r).PreviousSibling.FirstChild.innerText
  Next
  
  MiamiWeatherData = Results
  End Function
  </code></pre>