joaoricardo000 / whatsapp-bot-seed

A small python framework to create a whatsapp bot, with regex-callback message routing.
726 stars 245 forks source link

Google search not working because of API changes #96

Open DSchndr opened 7 years ago

DSchndr commented 7 years ago

The old Google websearch API is deprecated. Because of this the bot throws Body: /search cat Traceback (most recent call last): File ".../src/router.py", line 76, in handle_callback data = callback(message, match) File ".../src/views/google.py", line 29, in google_search page_url = urllib.unquote(req.json()["responseData"]["results"][0]["url"]) TypeError: 'NoneType' object has no attribute 'getitem' at me when i try to search something.

An fix would be to modify the code to fit the custom search API.