I am remodeling my house and need to compare material prices from different websites in order to get the best deal. I am trying to use PowerShell 7.2 and the Invoke-WebRequest command to scrape the item cost. For the life of me, I can't get the following to work and need some help.
$Url = 'https://www.lowes.com/pd/CertainTeed-Common-5-8-in-x-4-1-2-ft-x-12-ft-Actual-0-625-in-x-4-ft-x-12-ft-Drywall-Panel/1003189188'
$WebResponse = Invoke-WebRequest -Uri $Url -UserAgent 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0'
When I execute this in PowerShell 7.2, I get the following error...
Invoke-WebRequest:
Access Denied
Access Denied
You don't have permission to access "http://www.lowes.com/pd/CertainTeed-Common-5-8-in-x-4-1-2-ft-x-12-ft-Actual-0-625-in-x-4-ft-x-12-ft-Drywall-Panel/1003189188" on this server.
Reference #18.25784017.1639352283.bd0c2fa
What am I doing wrong?