don’t append /* when —exact-url

This commit is contained in:
Eli Dickinson 2025-06-15 13:11:02 -04:00
parent 18357a77ed
commit c3c5b8446a

View File

@ -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