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
Inspired-by: commit 30475c5c9e1d92d63b75dc5f22a40dd16c1aa23a
This commit is contained in:
parent
66ff4d9111
commit
9da87bfa74
@ -268,7 +268,7 @@ class WaybackMachineDownloader
|
||||
structure_dir_path dir_path
|
||||
open(file_path, "wb") do |file|
|
||||
begin
|
||||
URI.open("https://web.archive.org/web/#{file_timestamp}id_/#{file_url}", "Accept-Encoding" => "plain") do |uri|
|
||||
URI("https://web.archive.org/web/#{file_timestamp}id_/#{file_url}").open("Accept-Encoding" => "plain") do |uri|
|
||||
file.write(uri.read)
|
||||
end
|
||||
rescue OpenURI::HTTPError => e
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user