Skip to content
This repository was archived by the owner on Nov 30, 2022. It is now read-only.

Scraping Cricbuzz #318

Merged
merged 4 commits into from
Oct 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Web-Scraping/Cricbuzz Scrap/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Cricbuzz srapper

This python script will scrap cricbuzz.com to get live scores.

## Technologies used:
- urllib.request
- BeautifulSoup
17 changes: 17 additions & 0 deletions Web-Scraping/Cricbuzz Scrap/crik_buzz.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from urllib.request import urlopen
from bs4 import BeautifulSoup

URL = 'http://www.cricbuzz.com/cricket-match/live-scores'
page = urlopen(URL)
soup = BeautifulSoup(page,'html.parser')

update=[]

for score in soup.find_all('div',attrs={'class':'cb-col cb-col-100 cb-lv-main'}):
s=score.text.strip()
update.append(s)

for i in range(len(update)):
print(i+1),
print(update[i])