google_search ... NameError:name 'google' is not defined
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 377
- Forks
- 280
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 10
Description
Playing with some of the modules and came across this error, I seem to have a lot of them working now, BUT, I got this error on the google search?
Feb 16 19:14:44 MISP misp-modules[1794626]: File "/var/www/MISP/venv/lib/python3.8/site-packages/misp_modules/__init__.py", line 188, in run_request
Feb 16 19:14:44 MISP misp-modules[1794626]: response = mhandlers[module].handler(q=jsonpayload)
Feb 16 19:14:44 MISP misp-modules[1794626]: File "/var/www/MISP/venv/lib/python3.8/site-packages/misp_modules/modules/expansion/google_search.py", line 30,>
Feb 16 19:14:44 MISP misp-modules[1794626]: search_results = google.search(request['url'], num_page)
Feb 16 19:14:44 MISP misp-modules[1794626]: NameError: name 'google' is not defined
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading modules/expansion/google_search.py, especially the call at line 30, and inspect how its imports and dependencies are configured. Reproduce the Google Search expansion request and trace why the referenced name is unavailable; done means the handler runs without this NameError and the module’s relevant test or request path passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- search
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100