From e3173b364c459baef3fde4f2fbf2df4faf884db6 Mon Sep 17 00:00:00 2001 From: supergonkas <duramato@users.noreply.github.com> Date: Wed, 30 Dec 2015 19:48:52 +0000 Subject: [PATCH] Fix min Seeds/Leeches for LimeTorrents --- sickbeard/providers/limetorrents.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sickbeard/providers/limetorrents.py b/sickbeard/providers/limetorrents.py index 048bf6913..cb5f9f4da 100644 --- a/sickbeard/providers/limetorrents.py +++ b/sickbeard/providers/limetorrents.py @@ -90,13 +90,12 @@ class LimeTorrentsProvider(TorrentProvider): # pylint: disable=too-many-instance # Category: <a href="http://www.limetorrents.cc/browse-torrents/TV-shows/">TV shows</a><br /> Seeds: 1<br />Leechers: 0<br />Size: 7.71 GB<br /><br /><a href="http://www.limetorrents.cc/Owen-Hart-of-Gold-Djon91-torrent-7180661.html">More @ limetorrents.cc</a><br /> # ]]> description = item.find('description') - seeders = description.find_all('br')[0].next_sibling.strip().lstrip('Seeds: ') - leechers = description.find_all('br')[1].next_sibling.strip().lstrip('Leechers: ') - else: + seeders = try_int(description.find_all('br')[0].next_sibling.strip().lstrip('Seeds: ')) + leechers = try_int(description.find_all('br')[1].next_sibling.strip().lstrip('Leechers: ')) else: #<description>Seeds: 6982 , Leechers 734</description> description = item.find('description').text.partition(',') - seeders = description[0].lstrip('Seeds: ').strip() - leechers = description[2].lstrip('Leechers ').strip() + seeders = try_int(description[0].lstrip('Seeds: ').strip()) + leechers = try_int(description[2].lstrip('Leechers ').strip()) size = try_int(item.find('size').text, -1) except (AttributeError, TypeError, KeyError, ValueError): -- GitLab