Typo on modules/google.py, 'html' -> 'http'
This commit is contained in:
parent
b144d5e37e
commit
3016916087
1 changed files with 3 additions and 3 deletions
|
@ -40,14 +40,14 @@ class Module(ModuleManager.BaseModule):
|
||||||
"""
|
"""
|
||||||
phrase = event["args"] or event["target"].buffer.get()
|
phrase = event["args"] or event["target"].buffer.get()
|
||||||
if phrase:
|
if phrase:
|
||||||
page = utils.html.get_url(URL_GOOGLESUGGEST, get_params={
|
page = utils.http.get_url(URL_GOOGLESUGGEST, get_params={
|
||||||
"output": "json", "client": "hp", "q": phrase})
|
"output": "json", "client": "hp", "gl": "gb", "q": phrase})
|
||||||
if page:
|
if page:
|
||||||
# google gives us jsonp, so we need to unwrap it.
|
# google gives us jsonp, so we need to unwrap it.
|
||||||
page = page.split("(", 1)[1][:-1]
|
page = page.split("(", 1)[1][:-1]
|
||||||
page = json.loads(page)
|
page = json.loads(page)
|
||||||
suggestions = page[1]
|
suggestions = page[1]
|
||||||
suggestions = [utils.html.strip_html(s[0]) for s in suggestions]
|
suggestions = [utils.http.strip_html(s[0]) for s in suggestions]
|
||||||
|
|
||||||
if suggestions:
|
if suggestions:
|
||||||
event["stdout"].write("%s: %s" % (phrase,
|
event["stdout"].write("%s: %s" % (phrase,
|
||||||
|
|
Loading…
Reference in a new issue