summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xwnpp-query.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/wnpp-query.py b/wnpp-query.py
index 8d4fc35..0b7e626 100755
--- a/wnpp-query.py
+++ b/wnpp-query.py
@@ -55,7 +55,11 @@ for line in url:
if options.description:
description = line.strip()
- description = ' (' + re.sub('</a>,', '', re.sub('(.*):(.*):', '', description))[:50].strip() + '...)'
+ try:
+ description = re.sub('</a>,', '', description)
+ description = ' (' + description.split(':')[2] + ')'
+ except:
+ description = ''
item.append(description)
else:
item.append('')