我正试着用PYTHON进行谷歌搜索,使用的是googlesearch
的PYTHON模块.我不仅想要输出URL,我还想要URL中信息的描述,基本上是网络抓取.
下面是包含高级参数的代码:
from googlesearch import search
print(search('my search', advanced=True)) #advanced argument is true, to make the search detailed
但我得到了这样的错误:
TypeError:Search()获得意外的关键字参数‘Advanced’
我不知道为什么会发生这种事.
我从https://pypi.org/project/googlesearch-python得到了这个代码.我还想指出的是,我不想使用其他Web抓取库,比如bs4
(BeatifulSoup4)或urllib
,特别是因为我想弄清楚为什么高级论点不被接受.