pythonweb-scrapinggoogle-search

Python google search "advanced" argument unexpected


I'm trying to perform a google search using python, using the googlesearch python module. I don't just want urls to be outputted, I also want a description of the information in the url, basically web scraping.

Here's the code that includes the advanced argument:

from googlesearch import search

print(search('my search', advanced=True)) #advanced argument is true, to make the search detailed

but I get this error:

TypeError: search() got an unexpected keyword argument 'advanced'

and I don't know why this is occurring.

I got this code from https://pypi.org/project/googlesearch-python. I would also like to note that I don't want to use other web scraping libraries, such as bs4 (BeatifulSoup4) or urllib, especially since I want to figure out why the advanced argument isn't being accepted.


Solution

  • Try installing it using :

    pip install googlesearch-python