1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Merge pull request #1403 from joshjowen/urllib-quote-keyerror

Urllib quote keyerrors issue #708
This commit is contained in:
Alexandre Beloin 2015-02-23 19:40:49 -05:00
commit 75e8cf307b
2 changed files with 3 additions and 3 deletions

View File

@ -504,7 +504,7 @@ class ProviderProxy:
def _buildURL(self, url): def _buildURL(self, url):
""" Return the Proxyfied URL of the page """ """ Return the Proxyfied URL of the page """
if self.isEnabled(): if self.isEnabled():
url = self.getProxyURL() + self.param + urllib.quote_plus(url) + self.option url = self.getProxyURL() + self.param + urllib.quote_plus(url.encode('UTF-8')) + self.option
logger.log(u"Proxified URL: " + url, logger.DEBUG) logger.log(u"Proxified URL: " + url, logger.DEBUG)
return url return url
@ -517,4 +517,4 @@ class ProviderProxy:
else: else:
regx = re.sub('//1', '', regx) regx = re.sub('//1', '', regx)
return regx return regx

View File

@ -171,7 +171,7 @@ class RarbgProvider(generic.TorrentProvider):
for search_string in search_params[mode]: for search_string in search_params[mode]:
for sc in self.subcategories: for sc in self.subcategories:
searchURL = self.urls['search'] % (urllib.quote(search_string), sc) searchURL = self.urls['search'] % (urllib.quote(search_string.encode('UTF-8'))), sc)
logger.log(u"" + self.name + " search page URL: " + searchURL, logger.DEBUG) logger.log(u"" + self.name + " search page URL: " + searchURL, logger.DEBUG)
data = self.getURL(searchURL) data = self.getURL(searchURL)