Check that we have an AbstractURL in DDG results

This commit is contained in:
jesopo 2019-04-25 20:49:27 +01:00
parent b45b9b6219
commit da52baebcc

View file

@ -18,7 +18,7 @@ class Module(ModuleManager.BaseModule):
"q": phrase, "format": "json", "no_html": "1", "q": phrase, "format": "json", "no_html": "1",
"no_redirect": "1"}, json=True) "no_redirect": "1"}, json=True)
if page: if page and page.data["AbstractURL"]:
event["stdout"].write(page.data["AbstractURL"]) event["stdout"].write(page.data["AbstractURL"])
else: else:
event["stderr"].write("No results found") event["stderr"].write("No results found")