How to Solve NameError: name 'search' is not defined -- googlesearch

Solution: Import the 'search' module

To Solve the error, add the following line to the top of your code.

from googlesearch import search

 

For more information:
Python googlesearch search