From a8476e89f4a9976839b16517cf66621652db110e Mon Sep 17 00:00:00 2001 From: Noam Date: Tue, 1 Mar 2016 12:17:13 +0200 Subject: [PATCH] Log User-Agent Switch --- headphones/deluge.py | 1 + 1 file changed, 1 insertion(+) diff --git a/headphones/deluge.py b/headphones/deluge.py index bde7856f..e79482e2 100644 --- a/headphones/deluge.py +++ b/headphones/deluge.py @@ -85,6 +85,7 @@ def addTorrent(link, data=None): elif link.lower().startswith('http://') or link.lower().startswith('https://'): logger.debug('Deluge: Got a URL: %s' % _scrubber(link)) if link.lower().startswith(tuple(special_treatment_sites)): + logger.debug('Deluge: Trying different user-agent for this site') user_agent = 'Headphones' else: 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'