diff --git a/lib/docs/scrapers/crystal.rb b/lib/docs/scrapers/crystal.rb index ed26c585..94da0e29 100644 --- a/lib/docs/scrapers/crystal.rb +++ b/lib/docs/scrapers/crystal.rb @@ -36,7 +36,7 @@ module Docs def get_latest_version(opts) doc = fetch_doc('https://crystal-lang.org/', opts) - doc.at_css('.latest-release').content.scan(/([0-9.]+)/)[0][0] + doc.at_css('.latest-release-info > a > strong').content.scan(/([0-9.]+)/)[0][0] end end end diff --git a/lib/docs/scrapers/docker.rb b/lib/docs/scrapers/docker.rb index 5d01341d..070796ae 100644 --- a/lib/docs/scrapers/docker.rb +++ b/lib/docs/scrapers/docker.rb @@ -96,7 +96,7 @@ module Docs def get_latest_version(opts) doc = fetch_doc('https://docs.docker.com/engine/release-notes/', opts) - latest_version = doc.at_css('.content > section > h2').content.strip + latest_version = doc.at_css('.DocSearch-content > h2 > a').content.strip latest_version.rpartition(' ')[-1] end end diff --git a/lib/docs/scrapers/node.rb b/lib/docs/scrapers/node.rb index 60a89677..c41f82b1 100644 --- a/lib/docs/scrapers/node.rb +++ b/lib/docs/scrapers/node.rb @@ -74,8 +74,8 @@ module Docs end def get_latest_version(opts) - doc = fetch_doc('https://nodejs.org/en/', opts) - doc.at_css('#home-intro > .home-downloadblock:last-of-type > a')['data-version'][1..-1] + tags = get_github_tags('nodejs', 'node', opts) + tags[0]['name'][1..-1] end end end diff --git a/lib/docs/scrapers/octave.rb b/lib/docs/scrapers/octave.rb index fa9103fc..def6541e 100644 --- a/lib/docs/scrapers/octave.rb +++ b/lib/docs/scrapers/octave.rb @@ -51,7 +51,7 @@ module Docs def get_latest_version(opts) doc = fetch_doc('https://octave.org/doc/interpreter/', opts) - doc.at_css('h1').content.scan(/([0-9.]+)/)[0][0] + doc.at_css('#SEC_Top + p').content.scan(/([0-9.]+)/)[1][0][0..-2] end end diff --git a/lib/docs/scrapers/phalcon.rb b/lib/docs/scrapers/phalcon.rb index c6ca63f2..a0fa8e06 100644 --- a/lib/docs/scrapers/phalcon.rb +++ b/lib/docs/scrapers/phalcon.rb @@ -31,8 +31,8 @@ module Docs end def get_latest_version(opts) - doc = fetch_doc('https://docs.phalconphp.com/', opts) - doc.at_css('.header__lang.expand > div > ul > li > a').content + tags = get_github_tags('phalcon', 'cphalcon', opts) + tags[0]['name'][1..-1] end end end diff --git a/lib/docs/scrapers/sanctuary_type_classes.rb b/lib/docs/scrapers/sanctuary_type_classes.rb index 5156e689..87f4410f 100644 --- a/lib/docs/scrapers/sanctuary_type_classes.rb +++ b/lib/docs/scrapers/sanctuary_type_classes.rb @@ -23,7 +23,7 @@ module Docs HTML def get_latest_version(opts) - get-npm-version("sanctuary-type-classes", opts) + get_npm_version("sanctuary-type-classes", opts) end end end