mirror of
https://github.com/StrawberryMaster/wayback-machine-downloader.git
synced 2025-12-18 18:26:43 +00:00
Merge pull request #163 from DessertArbiter/master
updated deprecated calls, changed URI http to https
This commit is contained in:
commit
e6707a9d8b
@ -268,7 +268,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}", "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)
|
file.write(uri.read)
|
||||||
end
|
end
|
||||||
rescue OpenURI::HTTPError => e
|
rescue OpenURI::HTTPError => e
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
module ArchiveAPI
|
module ArchiveAPI
|
||||||
|
|
||||||
def get_raw_list_from_api url, page_index
|
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 += url
|
||||||
request_url += parameters_for_api page_index
|
request_url += parameters_for_api page_index
|
||||||
|
|
||||||
open(request_url).read
|
URI.open(request_url).read
|
||||||
end
|
end
|
||||||
|
|
||||||
def parameters_for_api page_index
|
def parameters_for_api page_index
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user