Fixed Newzbin downloads in new searcher with preprocessing. Upped

timeout as my newznab provider lags. Make a config option for this?
This commit is contained in:
sbuser
2011-08-09 18:33:11 -05:00
parent c2092211f8
commit 63b48a0663

View File

@@ -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