DanGough / Nevergreen

This module is an alternative to Evergreen, and allows you to find the latest version and download URL for various Windows apps. Evergreen uses API queries to obtain its data whereas this module is more focussed on web scraping. This is more prone to breaking when websites are changed, hence the name.
The Unlicense
74 stars 18 forks source link

[Bug] Zoom VDI download link is now forbidden #28

Closed JonathanPitre closed 1 year ago

JonathanPitre commented 2 years ago

Get-NevergreenApp Zoom now returns the following error

Get-Link : Get-Link: The remote server returned an error: (403) Forbidden.
At C:\Users\jonathan\Documents\WindowsPowerShell\Modules\Nevergreen\2110.1\Apps\Get-zoom.ps1:29 char:23
+ ... wnloadURL = Get-Link -Uri 'https://support.zoom.us/hc/en-us/sections/ ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-Link

WARNING: Unable to get results for Zoom VDI downloads: Cannot validate argument on parameter 'Uri'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.

The VDI download url is still valid trough a web browser but cannot be reached with Invoke-WebRequest for some reason.

Invoke-WebRequest -Uri "https://support.zoom.us/hc/en-us/sections/360011509631-VDI-Downloads"
Invoke-WebRequest : The remote server returned an error: (403) Forbidden.
At line:1 char:1
+ Invoke-WebRequest -Uri "https://support.zoom.us/hc/en-us/sections/360 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
brauki commented 2 years ago

Hello Jonthan I have the same problem and can not find a solution, maybe you have already found a solution ? Thanks

JonathanPitre commented 2 years ago

No I have not, the zoom website blocks the invoke-webrequest for no apparent reason. I've tried everything I could think of.

On Fri, Jan 14, 2022, 12:55 AM brauki @.***> wrote:

Hello Jonthan I have the same problem and can not find a solution, maybe you have already found a solution ? Thanks

— Reply to this email directly, view it on GitHub https://github.com/DanGough/Nevergreen/issues/28#issuecomment-1012797372, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSO5QLH6QS6LIK6ZTV2E2LUV63GFANCNFSM5IIPKJDA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

brauki commented 2 years ago

Thanks Jonthan, that's really too bad if I find something share it with you. Thanks Thomas

DanGough commented 2 years ago

@JonathanPitre @brauki Hi, could you guys please let me know if this is still an issue for you guys? It's working for me today.

JonathanPitre commented 2 years ago

@DanGough Still buggy for me.

image

JonathanPitre commented 2 years ago

I have contacted Zoom support about the issue https://support.zoom.us/hc/en-us/requests/14943984

JonathanPitre commented 2 years ago

It seems to work fine with powershell 7

JonathanPitre commented 2 years ago

image

DanGough commented 2 years ago

Confirmed. I've tried setting a few user agents (e.g. Edge, Googlebot), and also capturing the headers/cookies sent via Edge web dev tools and sending those but I still get that 403 in PowerShell 5.

Invoke-WebRequest uses System.Net.WebRequest behind the scenes in PowerShell 5, but for 6+ they switched to System.Net.Http.HttpClient. So one avenue of investigation would be to use HttpClient directly...

DanGough commented 1 year ago

Resolved for the next release