Coders Packet

Live Score Notification in Python

By Swapnil

Python script to show live cricket score as desktop notification in regular interval.

Working-

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.

Requirements/About-

Code is in Python

 

Installation-

pip install beautifulsoup4

 

Library used-

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.

Download project

Reviews Report

Submitted by Swapnil (Swapnil)

Download packets of source code on Coders Packet