class Aquatone::Collectors::WaybackMachine
Constants
- DEFAULT_TIMEOUT
Public Instance Methods
run()
click to toggle source
# File lib/aquatone/collectors/wayback_machine.rb, line 17 def run response = nil Timeout::timeout(timeout) do response = get_request("http://web.archive.org/cdx/search/cdx?url=*.#{url_escape(domain.name)}&output=json&fl=original&collapse=urlkey") end response.parsed_response.each do |page| if page[0] != "original" begin add_host(URI.parse(page[0]).host) rescue URI::Error; end end end end
Private Instance Methods
timeout()
click to toggle source
# File lib/aquatone/collectors/wayback_machine.rb, line 33 def timeout if has_cli_option?("wayback-machine-timeout") return get_cli_option("wayback-machine-timeout").to_i end DEFAULT_TIMEOUT end