Update plugins/wikipedia.py

This commit is contained in:
lukeroge 2012-02-20 10:09:58 +13:00
parent 08068e2d51
commit 0525797cd8

View file

@ -27,7 +27,7 @@ def wiki(inp):
if x.find('error') is not None:
return 'error: %(code)s: %(info)s' % x.find('error').attrib
else:
return 'no results found'
return 'No results found.'
def extract(item):
return [item.find(ns + x).text for x in
@ -48,4 +48,4 @@ def wiki(inp):
if len(desc) > 300:
desc = desc[:300] + '...'
return '%s :: %s' % (desc, http.quote(url, ':/'))
return '%s -- %s' % (desc, http.quote(url, ':/'))