Skip to content

Commit

Permalink
Merge pull request #2499 from JPRuskin/fix-quiterss
Browse files Browse the repository at this point in the history
  • Loading branch information
AdmiringWorm authored Jul 8, 2024
2 parents a7c48b1 + 5883796 commit a85f0bf
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 a85f0bf

Please sign in to comment.