From 387a71153815846cea659fac085a09babb64a321 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 21 Dec 2014 21:14:38 +0100 Subject: [PATCH] TorrentBytes not encoding name fix #4377 --- .../core/media/_base/providers/torrent/torrentbytes.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/couchpotato/core/media/_base/providers/torrent/torrentbytes.py b/couchpotato/core/media/_base/providers/torrent/torrentbytes.py index 156243eb..8e2becb2 100644 --- a/couchpotato/core/media/_base/providers/torrent/torrentbytes.py +++ b/couchpotato/core/media/_base/providers/torrent/torrentbytes.py @@ -1,7 +1,7 @@ import traceback from bs4 import BeautifulSoup -from couchpotato.core.helpers.encoding import tryUrlencode +from couchpotato.core.helpers.encoding import tryUrlencode, toUnicode from couchpotato.core.helpers.variable import tryInt from couchpotato.core.logger import CPLog from couchpotato.core.media._base.providers.torrent.base import TorrentProvider @@ -56,11 +56,12 @@ class Base(TorrentProvider): full_id = link['href'].replace('details.php?id=', '') torrent_id = full_id[:6] + name = toUnicode(link.contents[0]) results.append({ 'id': torrent_id, - 'name': link.contents[0], - 'url': self.urls['download'] % (torrent_id, link.contents[0]), + 'name': name, + 'url': self.urls['download'] % (torrent_id, name), 'detail_url': self.urls['detail'] % torrent_id, 'size': self.parseSize(cells[6].contents[0] + cells[6].contents[2]), 'seeders': tryInt(cells[8].find('span').contents[0]),