From 75360f734c85afbc0b9f0d18cc502482a8fd5ad3 Mon Sep 17 00:00:00 2001 From: salfab Date: Sun, 29 Sep 2013 14:12:52 +0200 Subject: [PATCH] use a proper name, instead of the link --- couchpotato/core/providers/torrent/ilovetorrents/main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/providers/torrent/ilovetorrents/main.py b/couchpotato/core/providers/torrent/ilovetorrents/main.py index 755af526..558277b9 100644 --- a/couchpotato/core/providers/torrent/ilovetorrents/main.py +++ b/couchpotato/core/providers/torrent/ilovetorrents/main.py @@ -69,7 +69,10 @@ class ILoveTorrents(TorrentMagnetProvider): entries = results_table.find_all('tr') for result in entries[1:]: - link = result.find(href = re.compile('details.php'))['href'] + prelink = result.find(href = re.compile('details.php')) + contents = prelink.find('b').contents + name = str(contents[0]) + link = prelink['href'] download = result.find('a', href = re.compile('download.php'))['href'] try: @@ -94,7 +97,7 @@ class ILoveTorrents(TorrentMagnetProvider): fileSize = self.parseSize(size) results.append({ 'id': id, - 'name': link, + 'name': name, 'url': url, 'detail_url': detail_url, 'size': fileSize,