mirror of https://github.com/evilhero/mylar
FIX: Another attempt to resolve some problems when downloading nzb.
This commit is contained in:
parent
80cd948ccd
commit
2ce9f613f6
|
@ -1663,7 +1663,7 @@ def searcher(nzbprov, nzbname, comicinfo, link, IssueID, ComicID, tmpprov, direc
|
||||||
apikey = newznab[2].rstrip()
|
apikey = newznab[2].rstrip()
|
||||||
down_url = host_newznab_fix + 'api'
|
down_url = host_newznab_fix + 'api'
|
||||||
else:
|
else:
|
||||||
down_url = 'https://api.nzb.su/api'
|
down_url = 'https://api.nzb.su/api?'
|
||||||
apikey = mylar.NZBSU_APIKEY
|
apikey = mylar.NZBSU_APIKEY
|
||||||
|
|
||||||
payload = {'t': 'get',
|
payload = {'t': 'get',
|
||||||
|
@ -1692,6 +1692,13 @@ def searcher(nzbprov, nzbname, comicinfo, link, IssueID, ComicID, tmpprov, direc
|
||||||
|
|
||||||
import lib.requests as requests
|
import lib.requests as requests
|
||||||
|
|
||||||
|
if down_url.startswith('https'):
|
||||||
|
try:
|
||||||
|
from lib.requests.packages.urllib3 import disable_warnings
|
||||||
|
disable_warnings()
|
||||||
|
except:
|
||||||
|
logger.warn('Unable to disable https warnings. Expect some spam if using https nzb providers.')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
r = requests.get(down_url, params=payload, verify=verify, headers=headers)
|
r = requests.get(down_url, params=payload, verify=verify, headers=headers)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue