Hey Everyone!
In this video we are going to write a script that would return the live cricket score of your favorite cricket team and then send this as a Whatsapp message to your phone.
Things we are going to do in this video
1) Get API Key from Cricbuz cricket api
2) Use this api to get the list of all cricket matches that are going to happen or already concluded
3) Parse this json that will be fetched from requests library
4) Use the information to get a unique_id and make a request to the cricapi end point and then get the current live cricket score.
For the sake of this tutorial I am going to use the Indian Cricket team as an example.
Once we get the live cricket score we will use this data to send a whatsapp message to registered phone number using Twillio Sanbox api, later on we could schedule this script to give us live score updates.
Python API to get live cricket score:
We will be using the Cricapi that has free tier of 100 requests per day to get the live cricket score.
The live cricket score, player statistics and fantasy scorecard API allow you to get API data anytime, 24x7 at your fingertips. It's extremely simple, easy to use - with a huge collection of examples.
Targeted at Developers and Cricket lovers, we bill you next to nothing for using our powerful JSON API & Feeds.
Since cricapi does not have true Python bindings to return the live score we are going to use the requests library to fetch data and then parse the JSON to get the meaningful information
Github Code : https://github.com/AdityaPai2398/Get_...
Cric Api : https://www.cricapi.com
And finally, don't forget to hit that subscribe button down there, have lot of awesome content on the way!
Tags : python whatsapp, cricket live, cricket python, python automation, python bot, whatsapp bot, get cricket score python, how to get cricket score in python, python and whatsapp bot, twillio bot, twillio python, python sports, python api, cricket api