Open kodamaChameleon opened 1 day ago
Just confirming that this does appear to be a rate limiting issue. After 24 hours, google removed the block on the IP. Re-attempting to pull results for multiple users recreated the error.
Looks like this error was already addressed with commit 2534f6cb3d2d119761b8803a6163e9c871a36d07 and just hasn't made it's way into release yet. I was looking to create a pull request with the fix, but I see the fix is already in the master branch.
Describe the bug Rate limiting or other unknown behavior causes Google to flag host IP address causing get_reviews to fail. The specific error is:
To Reproduce Since I do not know precisely the behavior which caused Google to flag the host IP, I do not know exactly how to recreate. One could try creating a list of known good gmail accounts and then iterate through them rapidly to generate suspicious traffic.
Expected behavior The expected behavior is to fetch google reviews and generate maps data; however, the above message abruptly terminates the program.
Screenshots Below is a print of req.text from helpers/gmaps.py -> get_reviews (line 56)
System (please complete the following information):
Recommendations
Near term -- add exception handling to gracefully handle when Google blocks the users IP address
Long term -- identify root cause and add logic (rate limiting, headers, other) to avoid Google blocking