From 99c3e8498ddc33c9103437a0c84e68b6c90d79b8 Mon Sep 17 00:00:00 2001 From: Ade Date: Sun, 3 Jun 2018 15:22:16 +1200 Subject: [PATCH] More Jackett magnet --- headphones/searcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/headphones/searcher.py b/headphones/searcher.py index b975d3cc..7df016f2 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -1918,7 +1918,7 @@ def preprocess(resultlist): 'User-Agent'] = 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2243.2 Safari/537.36' # Jackett sometimes redirects to a magnet URI - if result[3].startswith('Jackett_'): + if result[3].startswith('Jackett_') or 'torznab' in result[3].lower(): r = request.request_response(url=result[2], headers=headers, allow_redirects=False) magnet_link = r.headers.get('Location') if magnet_link and magnet_link.startswith('magnet:'):