mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-13 07:09:27 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user