From d5c769229ad02ad2c194b7577fdb2e4446710cf3 Mon Sep 17 00:00:00 2001 From: TheLegs Date: Mon, 2 Dec 2013 20:55:39 +0100 Subject: [PATCH] Fixed TorrentReactor class The output from TorrentReactor was not matching the structure in this file (perhaps a recent change?), so the script was keeping returning a generic error. --- resources/lib/search.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/search.py b/resources/lib/search.py index 6ab67e2..45332c8 100644 --- a/resources/lib/search.py +++ b/resources/lib/search.py @@ -59,9 +59,9 @@ class TorrentReactor(Search): f = urlopen(url) soup = BeautifulStoneSoup(f.read()) for item in soup.findAll('item'): - (seeds, leechers) = re.findall('Status: (\d+) seeders, (\d+) leecher', item.description.text)[0] + (seeds, leechers) = re.findall('Status: (\d+) seeder, (\d+) leecher', item.description.text)[0] torrents.append({ - 'url': item.enclosure['url'], + 'url': item.url.text, 'name': item.title.text, 'seeds': int(seeds), 'leechers': int(leechers),