diff --git a/ox/thepiratebay.py b/ox/thepiratebay.py index 3751897..f15be62 100644 --- a/ox/thepiratebay.py +++ b/ox/thepiratebay.py @@ -89,7 +89,8 @@ def getData(piratebayId): return None torrent[u'title'] = decodeHtml(torrent[u'title']).strip() torrent[u'imdbId'] = findRe(data, 'title/tt(\d{7})') - torrent[u'torrent_link']="http://torrents.thepiratebay.org/%s/%s.torrent" % (piratebayId, quote(torrent['title'])) + title = quote(torrent['title'].encode('utf-8')) + torrent[u'torrent_link']="http://torrents.thepiratebay.org/%s/%s.torrent" % (piratebayId, title) for d in re.compile('dt>(.*?):.*?(.*?)', re.DOTALL).findall(data): key = d[0].lower().strip() key = _key_map.get(key, key)