Fix get_latest_version procedure that were showing bad information
Unified · Split
| @@ -35,8 +35,8 @@ module Docs · 34 unmodified lines | |||
| 35 | HTML | 35 | HTML |
| 36 | 36 | ||
| 37 | def get_latest_version(opts) | 37 | def get_latest_version(opts) |
| 38 | doc = fetch_doc('http://httpd.apache.org/docs/', opts) | 38 | doc = fetch_doc('http://httpd.apache.org/download', opts) |
| 39 | doc.at_css('#apcontents > ul a')['href'][0...-1] | 39 | doc.at_css('#apcontents li > a').content |
| 40 | end | 40 | end |
| 41 | end | 41 | end |
| 42 | end | 42 | end |
| @@ -82,8 +82,8 @@ module Docs · 81 unmodified lines | |||
| 82 | end | 82 | end |
| 83 | 83 | ||
| 84 | def get_latest_version(opts) | 84 | def get_latest_version(opts) |
| 85 | doc = fetch_doc('https://api.cakephp.org/3.7/', opts) | 85 | doc = fetch_doc('https://cakephp.org', opts) |
| 86 | doc.at_css('.version-picker .dropdown-toggle').content.strip | 86 | doc.at_css('.title-home h1').content.scan(/\d\.\d*\.*\d*\.*\d*\.*/)[0] |
| 87 | end | 87 | end |
| 88 | 88 | ||
| 89 | private | 89 | private |
| @@ -2,7 +2,7 @@ module Docs · 1 unmodified line | |||
| 2 | class Markdown < UrlScraper | 2 | class Markdown < UrlScraper |
| 3 | self.name = 'Markdown' | 3 | self.name = 'Markdown' |
| 4 | self.type = 'simple' | 4 | self.type = 'simple' |
| 5 | self.base_url = 'http://daringfireball.net/projects/markdown/syntax' | 5 | self.base_url = 'https://daringfireball.net/projects/markdown/syntax' |
| 6 | 6 | ||
| 7 | html_filters.push 'markdown/clean_html', 'markdown/entries' | 7 | html_filters.push 'markdown/clean_html', 'markdown/entries' |
| 8 | 8 | ||
| @@ -108,7 +108,8 @@ module Docs · 107 unmodified lines | |||
| 108 | end | 108 | end |
| 109 | 109 | ||
| 110 | def get_latest_version(opts) | 110 | def get_latest_version(opts) |
| 111 | get_latest_github_release('rails', 'rails', opts) | 111 | doc = fetch_doc('https://rubyonrails.org/', opts) |
| 112 | doc.at_css('.version p a').content.scan(/\d\.\d*\.*\d*\.*\d*/)[0] | ||
| 112 | end | 113 | end |
| 113 | end | 114 | end |
| 114 | end | 115 | end |