Subject: Inquiry About Public API for Retrieving Latest 7-Zip Version and Network Issue with Web Scraping
Dear SourceForge/7-Zip Team,
I am reaching out to inquire whether there is a public API available (or planned) to retrieve the latest version of 7-Zip from the SourceForge project page (https://sourceforge.net/projects/sevenzip/files/7-Zip/). My goal is to automate the download of the latest 64-bit Windows executable (e.g., 7z2408-x64.exe) for a daily scheduled task in a PowerShell script.
We have developed a PowerShell script that uses Invoke-WebRequest
to scrape the SourceForge file page (https://sourceforge.net/projects/sevenzip/files/7-Zip/) to extract the latest version number and construct the download URL (e.g., https://sourceforge.net/projects/sevenzip/files/7-Zip/24.08/7z2408-x64.exe/download). The script works in principle but frequently encounters the following error:
Invoke-WebRequest : Die zugrunde liegende Verbindung wurde geschlossen: Unerwarteter Fehler beim Senden.
This suggests a network-related issue, possibly due to proxy settings, firewall restrictions, or SourceForge’s anti-bot mechanisms. We have implemented a user-agent header (Mozilla/5.0 ... Chrome/91.0.4472.124 ...
), TLS 1.2/1.3 support, and timeouts, but the issue persists in our environment.
(\d+\.\d+\.\d+|\d+\.\d+)
), and constructs the download URL. It runs as a scheduled task under the SYSTEM account and saves the file to C:\$Install\_Fremdsoftware\7zip\7zip.exe
with a version file (7zip.txt
).24.08
as a fallback if the version extraction fails.We would greatly appreciate any guidance on using an API or resolving the network issue. If needed, I can provide the relevant script excerpt or further details about our environment.
Thank you for your time and support!
Best regards,
Louis