From 8d5be7a89e474f62aa9cf935671214183c36d721 Mon Sep 17 00:00:00 2001 From: hartator Date: Mon, 14 Nov 2016 18:18:58 -0600 Subject: [PATCH] Fix compatibility with Ruby 1.9.x and proxies --- lib/wayback_machine_downloader/archive_api.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/wayback_machine_downloader/archive_api.rb b/lib/wayback_machine_downloader/archive_api.rb index 4f2effd..d3e82b7 100644 --- a/lib/wayback_machine_downloader/archive_api.rb +++ b/lib/wayback_machine_downloader/archive_api.rb @@ -5,12 +5,7 @@ def get_raw_list_from_api url, page_index request_url += url request_url += parameters_for_api page_index - request_uri = URI.parse request_url - Net::HTTP.new('web.archive.org', nil).start { |http| - request = Net::HTTP::Get.new request_uri - response = http.request request - response.body - } + open(request_url).read end def parameters_for_api page_index