From 04a65958843082e5d4ad8095f5ae599efce171bb Mon Sep 17 00:00:00 2001 From: Paul Wise Date: Mon, 7 Jun 2021 16:22:54 +0800 Subject: [PATCH] Check file_id_and_timestamp for nil instead in get_file_list_all_timestamps file_list_curated array uses file_id_and_timestamp as the index not file_id. Fixes: https://github.com/hartator/wayback-machine-downloader/issues/190 --- lib/wayback_machine_downloader.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wayback_machine_downloader.rb b/lib/wayback_machine_downloader.rb index 730714a..3b9a2bc 100644 --- a/lib/wayback_machine_downloader.rb +++ b/lib/wayback_machine_downloader.rb @@ -134,7 +134,7 @@ def get_file_list_all_timestamps file_id_and_timestamp = [file_timestamp, file_id].join('/') file_id_and_timestamp = CGI::unescape file_id_and_timestamp file_id_and_timestamp = file_id_and_timestamp.tidy_bytes unless file_id_and_timestamp == "" - if file_id.nil? + if file_id_and_timestamp.nil? puts "Malformed file url, ignoring: #{file_url}" else if match_exclude_filter(file_url)