Skip to content

Commit

Permalink
Merge pull request #163 from DessertArbiter/master
Browse files Browse the repository at this point in the history
updated deprecated calls, changed URI http to https
  • Loading branch information
hartator committed May 28, 2020
2 parents 069a7cc + 15edae6 commit e6707a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/wayback_machine_downloader.rb
Expand Up @@ -268,7 +268,7 @@ def download_file file_remote_info
structure_dir_path dir_path
open(file_path, "wb") do |file|
begin
open("http://web.archive.org/web/#{file_timestamp}id_/#{file_url}", "Accept-Encoding" => "plain") do |uri|
URI.open("https://web.archive.org/web/#{file_timestamp}id_/#{file_url}", "Accept-Encoding" => "plain") do |uri|
file.write(uri.read)
end
rescue OpenURI::HTTPError => e
Expand Down
4 changes: 2 additions & 2 deletions lib/wayback_machine_downloader/archive_api.rb
@@ -1,11 +1,11 @@
module ArchiveAPI

def get_raw_list_from_api url, page_index
request_url = "http://web.archive.org/cdx/search/xd?url="
request_url = "https://web.archive.org/cdx/search/xd?url="
request_url += url
request_url += parameters_for_api page_index

open(request_url).read
URI.open(request_url).read
end

def parameters_for_api page_index
Expand Down

0 comments on commit e6707a9

Please sign in to comment.