Skip to content

Commit

Permalink
(quiterss) Fixes Update.ps1
Browse files Browse the repository at this point in the history
The format of the downloads page (and what looks like the entire website) has changed quite considerably, to a hosted files/folders layout.

This change is now accounted for.
  • Loading branch information
JPRuskin committed Jul 3, 2024
1 parent 6369d4a commit 5883796
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions automatic/quiterss/update.ps1
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
Import-Module Chocolatey-AU

$releases = 'https://quiterss.org/en/download'
$releases = 'https://quiterss.org/files/'

function global:au_GetLatest {
$download_page = Invoke-WebRequest -Uri $releases -UseBasicParsing
$url = $download_page.links | ? href -match '.exe$' | select -First 1 -expand href
$version = $url -split '-' | select -First 1 -Skip 1
$releases_page = Invoke-WebRequest -Uri $releases -UseBasicParsing
$available_versions = $releases_page.links | Where-Object {$_.title -and $_.title.TrimEnd('_') -as [version]} | Sort-Object {$_.title.TrimEnd('_') -as [version]}
$latest_version_url = $releases.TrimEnd('/') + '/' + $available_versions[-1].href

$download_page = Invoke-WebRequest -Uri $latest_version_url -UseBasicParsing
$url = $download_page.links | ? href -match '\.exe$' | Select-Object -First 1 -expand href
$version = $url -split '-' | Select-Object -First 1 -Skip 1

@{
URL32 = 'https://quiterss.org' + $url
URL32 = $latest_version_url + $url
Version = $version
}
}
Expand Down

0 comments on commit 5883796

Please sign in to comment.