[devdocsgjs/main: 665/1867] Fix Go get_latest_version
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 665/1867] Fix Go get_latest_version
- Date: Fri, 19 Nov 2021 23:47:23 +0000 (UTC)
commit 5ac8d55ed6fc49a0b06b08dfa24dccd19d45365d
Author: Jasper van Merle <jaspervmerle gmail com>
Date: Fri Jul 19 21:44:18 2019 +0200
Fix Go get_latest_version
lib/docs/scrapers/go.rb | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/lib/docs/scrapers/go.rb b/lib/docs/scrapers/go.rb
index 8997b7b1..27b46652 100644
--- a/lib/docs/scrapers/go.rb
+++ b/lib/docs/scrapers/go.rb
@@ -25,13 +25,8 @@ module Docs
HTML
def get_latest_version(opts)
- doc = fetch_doc('https://golang.org/pkg/', opts)
-
- footer = doc.at_css('#footer').content
- version = footer.scan(/go([0-9.]+)/)[0][0]
- version = version[0...-1] if version.end_with?('.')
-
- version
+ doc = fetch_doc('https://golang.org/project/', opts)
+ doc.at_css('#page ul > li > a').text[3..-1]
end
private
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]