History

Implement get_latest_version for the remaining scrapers

Jasper van Merle committed 7 years ago

Commit 6ee16931 parent 0315c8854 files · +335 −2Browse files

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

Unified · Split

lib/docs/scrapers/python.rb+6−0
@@ -50,5 +50,11 @@ module Docs · 49 unmodified lines
5050
5151 html_filters.push 'python/entries_v2', 'sphinx/clean_html', 'python/clean_html'
5252 end
53+
54+ def get_latest_version(options, &block)
55+ fetch_doc('https://docs.python.org/', options) do |doc|
56+ block.call doc.at_css('.version_switcher_placeholder').content
57+ end
58+ end
5359 end
5460 end