History

haskell: fix get_latest_version

Simon Legner committed 4 years ago

Commit 3f4e8ff1 parent 02444cf1 file · +2 −2Browse files

Unified · Split

lib/docs/scrapers/haskell.rb+2−2
@@ -78,9 +78,9 @@ module Docs · 77 unmodified lines
7878 end
7979
8080 def get_latest_version(opts)
81− doc = fetch_doc('https://downloads.haskell.org/~ghc/latest/docs/html/', opts)
81+ doc = fetch_doc('https://www.haskell.org/ghc/download.html', opts)
8282 links = doc.css('a').to_a
83− versions = links.map {|link| link['href'].scan(/ghc-([0-9.]+)/)}
83+ versions = links.map {|link| link.content.scan(/\A([0-9.]+)\Z/)}
8484 versions.find {|version| !version.empty?}[0][0]
8585 end
8686