-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
search_results taking empty list values #92
Comments
Google has introduced new formats for their result page (I got at least 4 different page formats in my tests). This commit fixes the parsing for those four different formats for the description field. The parsing of other attributes like cache_link is still broken. Closes abenassi#92 Closes abenassi#88 Closes abenassi#84
I got the same error. The reason is that Google made changes to their design and the HTML structure and thus the parsing failed. Since they use A/B testing for sure (X% of users get one design and other Y% of users get another design). Sometimes the parsing fails and sometimes not (the old design seem to be returned in 10% of the cases). I got at least 4 different HTML structures when I tested it. #93 includes a fix for that... |
i got the same, i'm trying to use it but the result is just an empty list.
did i miss some thing ? please help me, thank you so much. |
Still doesn't work, seems deprecated no longer supported. from googleapi import google
num_page = 1
search_results = google.search("google", num_page)
print(search_results)
for result in search_results:
print(result.link) Result:
|
For 90% of the time the search_results list is taking empty values in hence, i am facing out of range errors.
Here is an example of the code that only works 10% of the time:
`from googleapi import google
def googleSearch(searchterm):
num_page = 1
search_results = google.search(searchterm, num_page)
return search_results[0].description
x = input('search?')
print(googleSearch(x))`
The text was updated successfully, but these errors were encountered: