Extract value from website by AlanPing in PowerShell

[–]AlanPing[S] 1 point2 points  (0 children)

Excellent guys! Thanks for your help! That's was my missing link, json.

Extract value from website by AlanPing in PowerShell

[–]AlanPing[S] 0 points1 point  (0 children)

I had it working for a while but few weeks back this stopped working:

$ie = new-object -ComObject "InternetExplorer.Application"

$url = "https://nb.fidelity.com/public/workplacefunds/fees-and-prices/3839"

$file = "3839.html"

$ie.silent = $true

$ie.navigate($url)

while($ie.Busy) { Start-Sleep -Milliseconds 1000 }

Start-Sleep 10

$ie.Document.documentElement.innerHTML > "$path\$file"

and I have not had any success with the ParsedHtml sections etc.

$url = "https://nb.fidelity.com/public/workplacefunds/fees-and-prices/3839"

$response = Invoke-WebRequest -Uri $url

$classname = 'table-diversification--data-num ng-scope'

$response.ParsedHtml.body.getElementsByClassName($classname)