How to fetch the total number of results from a google search in the News section

152 Views Asked by At

Is there a way to use python GoogleNews library to extract the total number of results for a specific search from the "News" section. For example, if we google search "iPhone 14 pro max" and click on the "News" section, we can see the (total) number of results displayed (pic below) "About 11,200,000 results"

enter image description here

(By the way, I have already tried several posted solutions but none worked for me)

Thank you in advance

1

There are 1 best solutions below

1
sugarakis On

After a lot of searching and digging I found the solution in one of the postings

google search html doesn't contain div id='resultStats'

If you follow the answer of that post you will be able to retrieve the number of records returned from any google search. Just modify the "query" value and you are all set.