Search code examples
rsssourceforge

SourceForge file releases


I would like to automate updating from SourceForge. This was working for a while

http://sourceforge.net/projects/msys2/rss?path=/Base/x86_64

However I realized that the RSS feed has a max of 100 items. So if the chosen path was last updated before that then it will not be on RSS, and will return

500 Internal Server Error

§ File Releases

So can I access a SourceForge file list with another "API"? I would prefer to not have to scrape the page like an animal.


Solution

  • This is a workaround, but PowerShell can easily parse HTML

    $base = Invoke-WebRequest 'http://sourceforge.net/projects/msys2/files/Base/x86_64'
    

    Example, get latest file

    $base.Links | ? class -eq name | select -fir 1 -exp href
    

    Get latest file matching tar

    $base.Links | ? href -match tar | select -fir 1 -exp href