mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-21 11:05:32 +01:00
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'
This commit is contained in:
@@ -928,22 +928,19 @@ def searchTorrent(albumid=None, new=False, losslessOnly=False):
|
||||
logger.info(u'Parsing results from <a href="%s">Waffles.fm</a>' % 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:
|
||||
|
||||
Reference in New Issue
Block a user