Skip to content

Commit d1fe401

Browse files
authored
Update Cricbuzz_score_Scrapper.py
1 parent 58ab16b commit d1fe401

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Cricbuzz_score_Scrapper.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ def score_details():
1111
response = requests.get(url)
1212
html = response.text
1313
soup = bs.BeautifulSoup(html, 'lxml')
14-
14+
15+
#Extracting the score and the Batsman details
1516
score = soup.find('div', class_= 'cb-min-bat-rw')
1617
info = soup.findAll('div', class_= 'cb-min-itm-rw')
1718

18-
19-
2019
table = PrettyTable(['Batsman', 'Runs(Balls)', '4s', '6s', 'Strike Rate'])
20+
21+
#Extracting the Batsmen Details
2122
for i in range(2):
2223
batsman = info[i].select_one("div:nth-of-type(1)").text.strip()
2324
runs = info[i].select_one("div:nth-of-type(2)").text.strip()
@@ -34,9 +35,9 @@ def score_details():
3435
print(45*'+ ')
3536

3637

37-
'''Driver Code'''
38+
'''Driver Code - Calls the score function every 30 seconds.'''
3839
x = 0
3940
while x < 10:
4041
score_details()
4142
x += 1
42-
time.sleep(30)
43+
time.sleep(25)

0 commit comments

Comments
 (0)