1
0
Fork 0
mirror of https://github.com/evilhero/mylar synced 2025-02-20 21:16:51 +00:00

FIX: Fixed improper url-encoding of multiple spaces that was causing problems with some nzb providers

This commit is contained in:
evilhero 2016-09-11 16:19:43 -04:00
parent 9a30a74193
commit 1f3bd4d60a

View file

@ -398,8 +398,9 @@ def NZB_SEARCH(ComicName, IssueNumber, ComicYear, SeriesYear, Publisher, IssueDa
#cm = re.sub("\&", "%26", str(cm1))
cm = re.sub("\\band\\b", "", cm1.lower()) # remove 'and' & '&' from the search pattern entirely (broader results, will filter out later)
cm = re.sub("\\bthe\\b", "", cm.lower()) # remove 'the' from the search pattern to accomodate naming differences
cm = re.sub(" ", "%20", str(cm))
cm = re.sub("[\&\:\?\,]", "", str(cm))
cm = re.sub('\s+', ' ', cm)
cm = re.sub(" ", "%20", str(cm))
#determine the amount of loops here
i = 0
@ -650,6 +651,10 @@ def NZB_SEARCH(ComicName, IssueNumber, ComicYear, SeriesYear, Publisher, IssueDa
mylar.DOGNZB = 0
foundc = False
done = True
else:
logger.warn('API Error. Check the error message and take action if required.')
foundc = False
done = True
break
except:
#logger.info('no errors on data retrieval...proceeding')