-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.py
25 lines (22 loc) · 834 Bytes
/
run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from unicodedata import name
from premier_league.starting_point import BotStartingPoint
from premier_league.filters import PremierLeagueTableFilter
from premier_league.current_report import PremierLeagueClub
import time
def start_scraping():
print('waking up the bot!!')
with BotStartingPoint() as bot:
print('Hello, there! Thank you for waking me up. It might take a while;\n Working to prepare for the adventure')
bot.implicitly_wait(15)
bot.maximize_window()
bot.premier_league_homepage()
bot.accept_cookies()
bot.premier_league_table()
time.sleep(5)
bot.league_table()
def view_premier(club_name) -> list:
clubs = PremierLeagueClub.create_premier_clubs()
for item in clubs:
if item.club == club_name:
obj = item
return obj