Skip to content

Commit

Permalink
Make URI#open cross Ruby versions compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
hartator committed Jun 7, 2021
1 parent ba4ca60 commit 30475c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/wayback_machine_downloader/archive_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def get_raw_list_from_api url, page_index
request_url.query = URI.encode_www_form(params)

begin
json = JSON.parse(URI.open(request_url).read)
json = JSON.parse(URI(request_url).open.read)
if (json[0] <=> ["timestamp","original"]) == 0
json.shift
end
Expand Down

0 comments on commit 30475c5

Please sign in to comment.