sane-bt-search: clean up the jackett URLs

This commit is contained in:
2023-09-27 18:22:11 +00:00
parent 10e6436c34
commit 6df63d825a

View File

@@ -197,6 +197,11 @@ class Torrent:
logger.info(f"invalid magnet: {magnet}") logger.info(f"invalid magnet: {magnet}")
magnet = None magnet = None
if http_dl_uri:
# quirk: jackett responds with port number even if it's a default port number
# it still works, just adds noise to the output
http_dl_uri = http_dl_uri.replace('https://jackett.uninsane.org:443/', 'https://jackett.uninsane.org/')
if tracker_uri: if tracker_uri:
# quirk: bakabt's post-login redirection fails if the slashes aren't just right # quirk: bakabt's post-login redirection fails if the slashes aren't just right
tracker_uri = tracker_uri.replace('https://bakabt.me//', 'https://bakabt.me/') tracker_uri = tracker_uri.replace('https://bakabt.me//', 'https://bakabt.me/')