mirror of
https://github.com/StrawberryMaster/wayback-machine-downloader.git
synced 2025-12-17 17:56:44 +00:00
Merge pull request #34 from tamersalama/master
Set Accepted-Encoding to plain to avoid OpenURI issue
This commit is contained in:
commit
e3ac4ed22b
@ -110,7 +110,7 @@ class WaybackMachineDownloader
|
|||||||
structure_dir_path dir_path
|
structure_dir_path dir_path
|
||||||
open(file_path, "wb") do |file|
|
open(file_path, "wb") do |file|
|
||||||
begin
|
begin
|
||||||
open("http://web.archive.org/web/#{file_timestamp}id_/#{file_url}") do |uri|
|
open("http://web.archive.org/web/#{file_timestamp}id_/#{file_url}", "Accept-Encoding" => "plain") do |uri|
|
||||||
file.write(uri.read)
|
file.write(uri.read)
|
||||||
end
|
end
|
||||||
rescue OpenURI::HTTPError => e
|
rescue OpenURI::HTTPError => e
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user