From c3c5b8446add1616ce708f2b3e1dcb9566d77e26 Mon Sep 17 00:00:00 2001 From: Eli Dickinson Date: Sun, 15 Jun 2025 13:11:02 -0400 Subject: [PATCH] =?UTF-8?q?don=E2=80=99t=20append=20/*=20when=20=E2=80=94e?= =?UTF-8?q?xact-url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/wayback_machine_downloader/archive_api.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/wayback_machine_downloader/archive_api.rb b/lib/wayback_machine_downloader/archive_api.rb index cb4d92b..40d8ecd 100644 --- a/lib/wayback_machine_downloader/archive_api.rb +++ b/lib/wayback_machine_downloader/archive_api.rb @@ -7,7 +7,8 @@ module ArchiveAPI # Automatically append /* if the URL doesn't contain a path after the domain # This is a workaround for an issue with the API and *some* domains. # See https://github.com/StrawberryMaster/wayback-machine-downloader/issues/6 - if url && !url.match(/^https?:\/\/.*\//i) + # But don't do this when exact_url flag is set + if url && !url.match(/^https?:\/\/.*\//i) && !@exact_url url = "#{url}/*" end