0

For example, when the phrase "Liam Neeson age" is searched,displayed in bold font, at the top of the page is "63 years (June 7, 1952)." I have tried toying with the concepts presented from this previous question(Google Search from a Python App) with little success. I can only get links and not actual "answers." Ideally I would like to be able to input a string and have it return the "answer" provided by google. If there is no "answer," as it is with some searches, I would like to be able to know that as well.

Community
  • 1
  • 1
  • Have you tried checking if it's put into an identifiable div? I'd imagine google would assign some kind of identifier to it. – Carcigenicate Jul 23 '15 at 19:47

2 Answers2

0

Scrape with JavaScript-enabled browser like Firefox and Selenium WebDriver.

Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
-1

This is an example in Java. Hope you can convert to python.

driver.findElement(By.id("lst-ib")).sendKeys("Liam Neeson age");
driver.findElements(By.xpath("//*[@id="sbse0"]");
driver.findElements(By.xpath("//*[@id="sbse1"]");
Sandeep
  • 76
  • 2
  • 8