1

I would like to know if there is a way to retrieve the first, most prominent factual search result on Google using Python. I am referring to something like this:

search result example

As you can see, the first search result is not a website or a video, but a simple response of very little words. The searches I would like to do using Python will be of a very similar nature, with such direct results being the most common first result.

I am just a beginner in web-scraping, and am familiar with some of the concepts involved, but was not able to come up with a solution.

Any help would be highly appreciated. Thanks!

Diggy.
  • 6,344
  • 3
  • 17
  • 37
  • I am almost sure that this would be against ToS of google ... But if you still consider it, have a look at `phantomjs` which I think you can use to get the page. The analysis in python can later be done with `BeautifulSoup` or similar package. The alternative to all this would be to look for a Google API to perform the queries – urban Jun 16 '20 at 14:21
  • have you tried this https://stackoverflow.com/a/37084643/1207193? – iambr Jun 16 '20 at 14:24
  • @urban or use `python requests` or `selenium python`. But cool didn't know about `phantomjs` – iambr Jun 16 '20 at 14:26

0 Answers0