diff --git a/lib/docs/scrapers/crystal.rb b/lib/docs/scrapers/crystal.rb index 166be2f9..7813b848 100644 --- a/lib/docs/scrapers/crystal.rb +++ b/lib/docs/scrapers/crystal.rb @@ -52,8 +52,8 @@ module Docs end def get_latest_version(opts) - body = fetch('https://crystal-lang.org/api', opts) - body.scan(/Crystal Docs ([0-9.]+)/)[0][0] + doc = fetch_doc('https://crystal-lang.org/', opts) + doc.at_css('.latest-release').content.scan(/([0-9.]+)/)[0][0] end end end