Showing the changes to lib/docs/scrapers/cppref/cppref.rb (1 of 10 files). Show all
Unified · Split
| @@ -6,7 +6,7 @@ module Docs · 5 unmodified lines | ||
| 6 | 6 | |
| 7 | 7 | html_filters.insert_before 'clean_html', 'cppref/fix_code' |
| 8 | 8 | html_filters.push 'cppref/clean_html', 'title' |
| 9 | − # 'cpp20/entries', | |
| 9 | + | |
| 10 | 10 | options[:decode_and_clean_paths] = true |
| 11 | 11 | options[:container] = '#content' |
| 12 | 12 | options[:title] = false |
| @@ -21,9 +21,13 @@ module Docs · 8 unmodified lines | ||
| 21 | 21 | Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0. |
| 22 | 22 | HTML |
| 23 | 23 | |
| 24 | − # def get_latest_version | |
| 25 | − | |
| 26 | − # end | |
| 24 | + # Check if the 'headers' page has changed | |
| 25 | + def get_latest_version(opts) | |
| 26 | + doc = fetch_doc(self.base_url + self.root_path, opts) | |
| 27 | + date = doc.at_css('#footer-info-lastmod').content | |
| 28 | + date = date.match(/[[:digit:]]{1,2} .* [[:digit:]]{4}/).to_s | |
| 29 | + date = DateTime.strptime(date, '%e %B %Y').to_time.to_i | |
| 30 | + end | |
| 27 | 31 | |
| 28 | 32 | end |
| 29 | 33 | end |