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