diff --git a/lib/docs/scrapers/ansible.rb b/lib/docs/scrapers/ansible.rb index 6826b393..5a19e393 100644 --- a/lib/docs/scrapers/ansible.rb +++ b/lib/docs/scrapers/ansible.rb @@ -71,7 +71,7 @@ module Docs def get_latest_version(opts) doc = fetch_doc('https://docs.ansible.com/ansible/latest/index.html', opts) - doc.at_css('.DocSiteProduct-CurrentVersion').content.strip + doc.at_css('.version').content.strip end end end diff --git a/lib/docs/scrapers/dart.rb b/lib/docs/scrapers/dart.rb index e3b8c289..4522762b 100644 --- a/lib/docs/scrapers/dart.rb +++ b/lib/docs/scrapers/dart.rb @@ -33,7 +33,7 @@ module Docs def get_latest_version(opts) doc = fetch_doc('https://api.dartlang.org/', opts) label = doc.at_css('footer > span').content.strip - label.sub(/Dart /, '') + label.sub(/Dart\s*/, '') end end end diff --git a/lib/docs/scrapers/gnuplot.rb b/lib/docs/scrapers/gnuplot.rb index 0682ade4..d6d5b195 100644 --- a/lib/docs/scrapers/gnuplot.rb +++ b/lib/docs/scrapers/gnuplot.rb @@ -37,5 +37,11 @@ module Docs Distributed under the gnuplot license (rights to distribute modified versions are withheld). HTML + def get_latest_version(opts) + doc = fetch_doc('http://www.gnuplot.info/download.html', opts) + label = doc.at_css('h2').content.strip + label.sub(/[^0-9.]*/, '') + end + end end diff --git a/lib/docs/scrapers/pandas.rb b/lib/docs/scrapers/pandas.rb index e333da7f..fedba47b 100644 --- a/lib/docs/scrapers/pandas.rb +++ b/lib/docs/scrapers/pandas.rb @@ -62,9 +62,7 @@ module Docs end def get_latest_version(opts) - doc = fetch_doc('http://pandas.pydata.org/pandas-docs/stable/', opts) - label = doc.at_css('.body > .section > p').content - label.scan(/Version: ([0-9.]+)/)[0][0] + get_latest_github_release('pandas-dev', 'pandas', opts) end end end