mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Google: in lucky --snippet, properly convert html to text, using utils.web.htmlToText.
This commit is contained in:
parent
33c6eabf82
commit
614e6c3f43
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user