Home:ALL Converter>Python - Google Search API

Python - Google Search API

Ask Time:2017-02-09T02:10:35         Author:Paktros

Json Formatter

I'm trying to get the information in the Google banner after a search. I explain myself in more detail, what I'm trying to get is not the first links or description of Google, but the Google banner that gives you direct access to information.

Example: you type "PSG Team" in the search bar, Google will display the current team directly without having to navigate to another site.

I am currently using the Google-Search-API python module but can not retrieve the banner containing the necessary information.

Here is my code:

from google import google

num_page = 1
search_results = google.search("psg team", num_page)
for result in search_results:
     print (result.banner) #banner propriety doesn't exist but this is what I want

Thank you!

Author:Paktros,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/42120574/python-google-search-api
yy