Trying to use google search api showing me an error:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
5 import urllib
6 import time
----> 7 from google.colab import files
8 import io
9
ModuleNotFoundError: No module named 'google'
My Code:
import json
import pandas as pd
import urllib
import time
from google.colab import files
result_json = json.loads(result)
print(result_json)
with open('result.json', 'w') as outfile:
json.dump(result_json, outfile)
files.download('result.json')
I did:
pip install google not working either.
It looks like the package named google on PyPI is this one created by MarioVilas I am unsure if that's what you are looking for, but in the Github repo you can see the package is actually named googlesearch
# Package metadata.
metadata = dict(
name='google',
provides=['googlesearch'],
requires=['beautifulsoup4'],
packages=['googlesearch'],
scripts=[join('scripts', 'google')],
package_data={'googlesearch': ['user_agents.txt.gz']},
include_package_data=True,
version="3.0.0",
description="Python bindings to the Google search engine.",
author="Mario Vilas",
author_email="mvilas@gmail.com",
url="http://breakingcode.wordpress.com/",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Environment :: Console",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries :: Python Modules",
],
)
so you would need to "install google" but "import googlesearch"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.