From 7787f752233ac8d1daa4cbd99704e64d04b38338 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Sat, 17 Sep 2011 20:24:04 -0400 Subject: [PATCH] BTJunkie uses X instead of 0 if there are no seeds/leechers --- resources/lib/search.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/lib/search.py b/resources/lib/search.py index ca94dcd..ee80b13 100644 --- a/resources/lib/search.py +++ b/resources/lib/search.py @@ -20,7 +20,11 @@ class BTJunkie(Search): f = urlopen(url) soup = BeautifulStoneSoup(f.read()) for item in soup.findAll('item'): - (name, seeds, leechers) = re.findall('(.*?)\s+\[(\d+)\/(\d+)\]$', item.title.text)[0] + (name, seeds, leechers) = re.findall('(.*?)\s+\[(\d+|X)\/(\d+|X)\]$', item.title.text)[0] + if seeds == 'X': + seeds = 0 + if leechers == 'X': + leechers = 0 torrents.append({ 'url': item.enclosure['url'], 'name': name,