0

Still new to powershell, so sorry ahead of time. But I am trying to extract the data highlighted in yellow. But it seems like when the I run the following nothing is happening.

$getmeinfo = invoke-webrequest -Uri https://portal.assessor.lacounty.gov/parceldetail/5130020021
$UserHTMLDetails = $getmeinfo.ParsedHtml.getElementsByTagName('div') | Where-Object { $_.className -eq ' col-sm-4 '}
zx485
  • 28,498
  • 28
  • 50
  • 59
The Farm
  • 1
  • 1
  • Fundamentally, only _Windows PowerShell_ supports HTML parsing, and only if the Internet Explorer engine is present. If you get no output _and no errors_, the implication is that either `.getElementsByTagName('div')` returns nothing or, more likely, that your `Where-Object` filter doesn't match anything. Looking at your filter: remove the spaces around `col-sm-4`; with simplified syntax, you can try `Where-Object ClassName -eq col-sm-4` – mklement0 Jun 09 '23 at 18:05
  • 1
    Check out this thread for parsing tables with PS Core via the PowerHTML module: https://stackoverflow.com/questions/60655737/how-to-parse-html-table-with-powershell-core-7 – mike crowley Jun 09 '23 at 18:15

0 Answers0