mirror of
https://github.com/StrawberryMaster/wayback-machine-downloader.git
synced 2025-12-17 17:56:44 +00:00
Make URI#open cross Ruby versions compatible
This commit is contained in:
parent
ba4ca60377
commit
30475c5c9e
@ -10,7 +10,7 @@ module ArchiveAPI
|
|||||||
request_url.query = URI.encode_www_form(params)
|
request_url.query = URI.encode_www_form(params)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
json = JSON.parse(URI.open(request_url).read)
|
json = JSON.parse(URI(request_url).open.read)
|
||||||
if (json[0] <=> ["timestamp","original"]) == 0
|
if (json[0] <=> ["timestamp","original"]) == 0
|
||||||
json.shift
|
json.shift
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user