Private GIT

Skip to content
Snippets Groups Projects
Commit 05479140 authored by miigotu's avatar miigotu
Browse files

Merge pull request #2975 from fernandog/fix_provider_13

Try to fix encode/decode in HDT title
parents 533ba06e 5a10dad7
Branches
Tags
No related merge requests found
......@@ -96,7 +96,7 @@ class HDTorrentsProvider(generic.TorrentProvider):
for search_string in search_strings[mode]:
if mode != 'RSS':
searchURL = self.urls['search'] % (urllib.quote_plus(search_string.replace('.', ' ')), self.categories)
searchURL = self.urls['search'] % (urllib.quote_plus(search_string), self.categories)
else:
searchURL = self.urls['rss'] % self.categories
......@@ -120,7 +120,7 @@ class HDTorrentsProvider(generic.TorrentProvider):
data = data[index:]
html = BeautifulSoup(data, 'html5lib')
html = BeautifulSoup(data.encode('utf-8'), 'html5lib')
if not html:
logger.log("No html data parsed from provider", logger.DEBUG)
continue
......@@ -151,6 +151,7 @@ class HDTorrentsProvider(generic.TorrentProvider):
try:
if None is title and cell.get('title') and cell.get('title') in 'Download':
title = re.search('f=(.*).torrent', cell.a['href']).group(1).replace('+', '.')
title = title.decode('utf-8')
download_url = self.urls['home'] % cell.a['href']
continue
if None is seeders and cell.get('class')[0] and cell.get('class')[0] in 'green' 'yellow' 'red':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment