From 63b48a06639b3279f1b762d668f38f4fa795095d Mon Sep 17 00:00:00 2001 From: sbuser Date: Tue, 9 Aug 2011 18:33:11 -0500 Subject: [PATCH] Fixed Newzbin downloads in new searcher with preprocessing. Upped timeout as my newznab provider lags. Make a config option for this? --- headphones/searcher.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/headphones/searcher.py b/headphones/searcher.py index 35def60f..66216222 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -442,7 +442,7 @@ def verifyresult(title, term): return True def getresultNZB(result): - if result[3] == 'Newzbin': + if result[3] == 'newzbin': params = urllib.urlencode({"username": headphones.NEWZBIN_UID, "password": headphones.NEWZBIN_PASSWORD, "reportid": result[2]}) url = "https://www.newzbin.com" + "/api/dnzb/" urllib._urlopener = NewzbinDownloader() @@ -452,7 +452,7 @@ def getresultNZB(result): logger.warn('Error fetching nzb from url: ' + url + ' %s' % e) else: try: - nzb = urllib2.urlopen(result[2], timeout=20).read() + nzb = urllib2.urlopen(result[2], timeout=30).read() except urllib2.URLError, e: logger.warn('Error fetching nzb from url: ' + result[2] + ' %s' % e) return nzb