mirror of
https://github.com/StrawberryMaster/wayback-machine-downloader.git
synced 2025-12-17 09:46:05 +00:00
Fix compatibility with Ruby 1.9.x and proxies
This commit is contained in:
parent
54bd5d3852
commit
8d5be7a89e
@ -5,12 +5,7 @@ module ArchiveAPI
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user