aboutsummaryrefslogtreecommitdiff
path: root/modules/google.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-11-25 17:48:31 +0000
committerGravatar jesopo2019-11-25 17:48:31 +0000
commit8626a29a69f7632575ba117c8087343ecb8a9922 (patch)
tree7ccffd40819ad9fccf10cb2188efdcd4be0aaf1c /modules/google.py
parentremove `tags` from StdOut objects - expose through event_kwargs (diff)
signature
include <title> with !google/!g output
Diffstat (limited to 'modules/google.py')
-rw-r--r--modules/google.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/google.py b/modules/google.py
index 699e8ef0..47700eb9 100644
--- a/modules/google.py
+++ b/modules/google.py
@@ -33,8 +33,11 @@ class Module(ModuleManager.BaseModule):
"num": 1, "gl": "gb", "safe": safe}, json=True)
if page:
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(
- "(%s) %s" % (phrase, page.data["items"][0]["link"]))
+ "(%s) %s - %s" % (phrase, title, link))
else:
event["stderr"].write("No results found")
else: