Google: in lucky --snippet, properly convert html to text, using utils.web.htmlToText.

This commit is contained in:
Daniel Folkinshteyn 2010-07-14 19:03:31 -04:00 committed by Valentin Lorentz
parent 33c6eabf82
commit 614e6c3f43
1 changed files with 2 additions and 3 deletions

View File

@ -174,9 +174,8 @@ class Google(callbacks.PluginRegexp):
if data['responseData']['results']:
url = data['responseData']['results'][0]['unescapedUrl']
if opts.has_key('snippet'):
snippet = " | " + data['responseData']['results'][0]['content']
snippet = snippet.replace('<b>', '')
snippet = snippet.replace('</b>', '')
snippet = data['responseData']['results'][0]['content']
snippet = " | " + utils.web.htmlToText(snippet, tagReplace='')
else:
snippet = ""
result = url + snippet