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 | html_filters.insert_before 'clean_html', 'cppref/fix_code' | 7 | html_filters.insert_before 'clean_html', 'cppref/fix_code' |
| 8 | html_filters.push 'cppref/clean_html', 'title' | 8 | html_filters.push 'cppref/clean_html', 'title' |
| 9 | # 'cpp20/entries', | 9 | |
| 10 | options[:decode_and_clean_paths] = true | 10 | options[:decode_and_clean_paths] = true |
| 11 | options[:container] = '#content' | 11 | options[:container] = '#content' |
| 12 | options[:title] = false | 12 | options[:title] = false |
| @@ -21,9 +21,13 @@ module Docs · 8 unmodified lines | |||
| 21 | Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0. | 21 | Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0. |
| 22 | HTML | 22 | HTML |
| 23 | 23 | ||
| 24 | # def get_latest_version | 24 | # Check if the 'headers' page has changed |
| 25 | 25 | def get_latest_version(opts) | |
| 26 | # end | 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 | end | 32 | end |
| 29 | end | 33 | end |