Menu

#638 Inquiry About Public API for Retrieving Latest 7-Zip Version and Network Issue with Web Scraping

open
nobody
None
5
2025-05-28
2025-05-28
Louis
No

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.

Context

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.

Questions

  1. Public API Availability: Is there a public API endpoint available to retrieve the latest 7-Zip version or file metadata without requiring authentication (e.g., an API key)? The SourceForge Release API documentation (https://sourceforge.net/p/forge/documentation/Using%20the%20Release%20API/) suggests that APIs are primarily for project admins. A public endpoint would greatly simplify automation for non-admin users like us.
  2. Future Plans: If no such API exists, are there plans to introduce a public API for retrieving the latest file versions or metadata for projects hosted on SourceForge, such as 7-Zip?
  3. Workaround for Network Issue: Given the network error we’re encountering, do you have any recommendations for reliably accessing the file list or download URLs? For example, are there specific headers, rate limits, or alternative endpoints we should consider to bypass anti-bot protections or connection issues?

Additional Details

  • Script Overview: The script parses the file list page, extracts version numbers using a regex pattern ((\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).
  • Environment: Windows 10/11, PowerShell 5.1/7.x, running in a corporate network with potential proxy/firewall restrictions.
  • Fallback: We use version 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

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.