Skip to content

Commit

Permalink
Fix compatibility with Ruby 1.9.x and proxies
Browse files Browse the repository at this point in the history
  • Loading branch information
hartator committed Nov 15, 2016
1 parent 54bd5d3 commit 8d5be7a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/wayback_machine_downloader/archive_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8d5be7a

Please sign in to comment.