소스 검색

crystal: update get_latest_version

Jasper van Merle 6 년 전
부모
커밋
946fcc28ac
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      lib/docs/scrapers/crystal.rb

+ 2 - 2
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