fix: Making pep8 happy

pull/380/head
chrisr3d 2020-02-26 11:59:14 +01:00
parent fc54785d6b
commit c9c6f69bd4
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
2 changed files with 19 additions and 22 deletions

View File

@ -7,19 +7,16 @@ except ImportError:
misperrors = {'error': 'Error'}
mispattributes = {'input': ['url'], 'output': ['text']}
moduleinfo = {'author': 'Oun & Gindt', 'description': 'An expansion hover module to expand google search information about an URL', 'module-type': ['hover']}
moduleinfo = {'author': 'Oun & Gindt', 'module-type': ['hover'],
'description': 'An expansion hover module to expand google search information about an URL'}
def handler(q=False):
if q is False:
return False
request = json.loads(q)
if request.get('url'):
toquery = request['url']
else:
misperrors['error'] = "Unsupported attributes type"
return misperrors
if not request.get('url'):
return {'error': "Unsupported attributes type"}
num_page = 1
res = ""
search_results = google.search(request['url'], num_page)
@ -29,6 +26,7 @@ def handler(q=False):
res += '\n\n'
return {'results': [{'types': mispattributes['output'], 'values':res}]}
def introspection():
return mispattributes