Skip to content

Commit 15edae6

Browse files
updated deprecated calls, changed URI to https
1 parent 069a7cc commit 15edae6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/wayback_machine_downloader.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def download_file file_remote_info
268268
structure_dir_path dir_path
269269
open(file_path, "wb") do |file|
270270
begin
271-
open("http://web.archive.org/web/#{file_timestamp}id_/#{file_url}", "Accept-Encoding" => "plain") do |uri|
271+
URI.open("https://web.archive.org/web/#{file_timestamp}id_/#{file_url}", "Accept-Encoding" => "plain") do |uri|
272272
file.write(uri.read)
273273
end
274274
rescue OpenURI::HTTPError => e

lib/wayback_machine_downloader/archive_api.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
module ArchiveAPI
22

33
def get_raw_list_from_api url, page_index
4-
request_url = "http://web.archive.org/cdx/search/xd?url="
4+
request_url = "https://web.archive.org/cdx/search/xd?url="
55
request_url += url
66
request_url += parameters_for_api page_index
77

8-
open(request_url).read
8+
URI.open(request_url).read
99
end
1010

1111
def parameters_for_api page_index

0 commit comments

Comments
 (0)