include <title> with !google/!g output
This commit is contained in:
parent
4586bc7903
commit
8626a29a69
1 changed files with 4 additions and 1 deletions
|
@ -33,8 +33,11 @@ class Module(ModuleManager.BaseModule):
|
||||||
"num": 1, "gl": "gb", "safe": safe}, json=True)
|
"num": 1, "gl": "gb", "safe": safe}, json=True)
|
||||||
if page:
|
if page:
|
||||||
if "items" in page.data and len(page.data["items"]):
|
if "items" in page.data and len(page.data["items"]):
|
||||||
|
item = page.data["items"][0]
|
||||||
|
link = item["link"]
|
||||||
|
title = utils.parse.line_normalise(item["title"])
|
||||||
event["stdout"].write(
|
event["stdout"].write(
|
||||||
"(%s) %s" % (phrase, page.data["items"][0]["link"]))
|
"(%s) %s - %s" % (phrase, title, link))
|
||||||
else:
|
else:
|
||||||
event["stderr"].write("No results found")
|
event["stderr"].write("No results found")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue