History

Migrate c scraper from filescraper to urlscraper

Enoc committed 5 years ago

Commit fdfcf3d1 parent e17bc8410 files · +24 −204Browse files

Showing the changes to lib/docs/scrapers/cppref/cppref.rb (1 of 10 files). Show all

Unified · Split

lib/docs/scrapers/cppref/cppref.rb+8−4
@@ -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] = true10 options[:decode_and_clean_paths] = true
11 options[:container] = '#content'11 options[:container] = '#content'
12 options[:title] = false12 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 HTML22 HTML
23 23
24 # def get_latest_version24 # Check if the 'headers' page has changed
25 25 def get_latest_version(opts)
26 # end26 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 end32 end
29end33end