mirror of
https://github.com/hastagAB/Awesome-Python-Scripts.git
synced 2024-11-23 20:11:07 +00:00
Create cricbuzz_scrap.py
This commit is contained in:
parent
b2172fee7e
commit
cc3ca7c3af
20
CricBuzz_Score_Update/cricbuzz_scrap.py
Normal file
20
CricBuzz_Score_Update/cricbuzz_scrap.py
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
from urllib.request import urlopen
|
||||||
|
from bs4 import BeautifulSoup
|
||||||
|
|
||||||
|
quote_page = 'http://www.cricbuzz.com/cricket-match/live-scores'
|
||||||
|
page = urlopen(quote_page)
|
||||||
|
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)
|
||||||
|
|
||||||
|
print('-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*')
|
||||||
|
|
||||||
|
|
||||||
|
for i in range(len(update)):
|
||||||
|
print(i+1),
|
||||||
|
print(update[i])
|
||||||
|
print('-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*')
|
Loading…
Reference in New Issue
Block a user