[devdocsgjs/main: 939/1867] crystal: update get_latest_version
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 939/1867] crystal: update get_latest_version
- Date: Fri, 19 Nov 2021 23:47:36 +0000 (UTC)
commit 946fcc28ac2c6de9aa5dc64ea3a82c7c87595a2c
Author: Jasper van Merle <jaspervmerle gmail com>
Date: Fri Oct 4 18:46:29 2019 +0200
crystal: update get_latest_version
lib/docs/scrapers/crystal.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]