Skip to main content

Posts

Showing posts with the label ipl

Live IPL Score Using Python || Python Code for Live Cricket Score || IPL Match Detail Program in Python || Live Cricket Score - Creation Code

  Live IPL Score Using Python Hello coders, we are going to learn how we can create a GUI application to build a live score updater using python. We are going to use web scraping using BeautifulSoup class from bs4. We will use the crickbuzz for scraping Module to Be used: tkinter - Preinstalled module request - For requesting the webserver bs4 - It is used for web scraping Installation: pip install request pip install beautifulsoup4 Code: from tkinter import * import requests from bs4 import BeautifulSoup # create instance for window root = Tk () # set title for window root. title (" Indian Premier League ") # screen color configure root. config ( background = " skyblue ") # cricbuzz url to get score updates url = " https://www.cricbuzz.com/ " def get_score ():     # request data from cricbuzz     page = requests. get ( url )     soup = BeautifulSoup ( page . text ,' html.parser ')     # name of first team     team_1 = soup. find_all ( cl