josh-ashkinaze / Normalized-Google-Distance

A python script to calculate normalized google distance (NGD). This is a semantic similarity metric based on Google search results
15 stars 6 forks source link

NoneType error - specific case #6

Open nikeshpatel99 opened 3 years ago

nikeshpatel99 commented 3 years ago

Sometimes when Googling something, the div containing the number of results is replaced with a carousel and this stops the number_of_results function from being able to fetch the value.

For example: image

A fix I found was to always navigate to the second page of results by adding "&start=10" to the url parameters (the second page never seems to have the carousel) but there may be a better solution.