File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,11 @@ class Electron < UrlScraper
2626 HTML
2727
2828 def get_latest_version ( opts )
29- doc = fetch_doc ( 'https://www.electronjs.org/releases/stable' , opts )
30- doc . at_css ( '.release-card__metadata>a' ) [ 'href' ] . gsub! ( /[a-zA-Z\/ :]/ , '' ) [ 1 ..-1 ]
29+ doc = fetch_doc ( 'https://releases.electronjs.org/release?channel=stable' , opts )
30+
31+ # Builds are sorted by build time, not latest version. Manually sort rows by version.
32+ # This list is paginated; it is assumed the latest version is somewhere on the first page.
33+ doc . css ( 'table.w-full > tbody > tr td:first-child' ) . map ( &:content ) . sort! . last
3134 end
3235 end
3336end
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class Nix < UrlScraper
2323
2424 def get_latest_version ( opts )
2525 doc = fetch_doc ( 'https://nixos.org/manual/nix/stable/' , opts )
26- doc . at_css ( 'a.active' ) [ 'href' ] . scan ( /([0-9.]+)/ ) [ 0 ] [ 0 ]
26+ doc . at_css ( 'h1.menu-title' ) . content . scan ( /([0-9.]+)/ ) . first . first
2727 end
2828 end
2929end
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ class Redis < UrlScraper
2222
2323 def get_latest_version ( opts )
2424 body = fetch ( 'http://download.redis.io/redis-stable/00-RELEASENOTES' , opts )
25- body . scan ( /Redis Community Edition ([0-9.]+)/ ) [ 0 ] [ 0 ]
25+ body . scan ( /^ Redis ([0-9.]+)\s +Released/ ) . first . first
2626 end
2727
2828 private
You can’t perform that action at this time.
0 commit comments