diff options
| author | 2019-11-25 17:48:31 +0000 | |
|---|---|---|
| committer | 2019-11-25 17:48:31 +0000 | |
| commit | 8626a29a69f7632575ba117c8087343ecb8a9922 (patch) | |
| tree | 7ccffd40819ad9fccf10cb2188efdcd4be0aaf1c /modules/google.py | |
| parent | remove `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.py | 5 |
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: |
