PowerShell - Unable to find web elements using Invoke-WebRequest

Viewed 1435

I'm trying to scrape data from webpage http://www.theedge.co.nz/home.html using PowerShell. I want to extract the song title and artist text from this page.

enter image description here

I can see the elements are there when I inspect them.

enter image description here

But when I run the following script I'm unable to capture the information:

$Web = Invoke-WebRequest -Uri "http://www.theedge.co.nz/home.html"
$web.AllElements | Where {$_.tagname -eq "p"} | select innertext

I'm not sure if my code is wrong or that it is a limitation and just not possible to achieve using PowerShell.

Thanks in advance.

0 Answers
Related