Merge pull request #17 from elidickinson/fix-exact-url

don’t append /* when using —exact-url
This commit is contained in:
Felipe 2025-06-15 22:18:40 -03:00 committed by GitHub
commit 2490109cfe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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