Python script to show live cricket score as desktop notification in regular interval.
Used Cricinfo RSS feed to get the data. The data comes in the form of XML file which makes it easy for BeautifulSoup to harvest and to scrape the data.
Code is in Python
pip install beautifulsoup4
BeautifulSoup file for pulling data out of XML file
ToastNotifier for schedule and remove toast notification
Sleep to suspend execution of the current thread
To run -
$python3 Desktop notification.ipynb
To run this code you need to have active internet.
After running it returns only live matches and ignores the completed ones, and waits for user input.
As soon it receives the input it fetches the score of the match and shows it as desktop notification in regular interval.