From a32b77c589b93894d0325ab92a378f486b68e6f3 Mon Sep 17 00:00:00 2001 From: Ade Date: Sat, 3 Aug 2013 23:32:07 +1200 Subject: [PATCH] Waffles - get full title to allow filtering Currently strips the suffix from the title which has info such as [2013-CD-FLAC-Vinyl-24 96-Lossless]. Change to put this back in to allow ignore word filtering. Should also fix the parsing issue getting 'NoneType' object has no attribute 'group' --- headphones/searcher.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/headphones/searcher.py b/headphones/searcher.py index ef87243d..9a390603 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -928,22 +928,19 @@ def searchTorrent(albumid=None, new=False, losslessOnly=False): logger.info(u'Parsing results from Waffles.fm' % searchURL) d = feedparser.parse(data) + if not len(d.entries): logger.info(u"No results found from %s for %s" % (provider, term)) pass else: for item in d.entries: - try: - title_match = re.search(r"(.+)\[(.+)\]$", item.title) - title = title_match.group(1).strip() - details = title_match.group(2).split("-") + try: + title = item.title desc_match = re.search(r"Size: (\d+)<", item.description) size = desc_match.group(1) - url = item.link - resultlist.append((title, size, url, provider)) logger.info('Found %s. Size: %s' % (title, helpers.bytes_to_mb(size))) except Exception, e: