Beispiel #1
0
print("Main page loaded")

elems = driver.find_elements_by_class_name("table-row")

# elems = elems[10:13]

competitionList = []

for e in elems:
    competition = Competition(e)
    competitionList.append(competition)

liveEvent = []
# For each competition, go to the corresponding page
for competition in competitionList:
    competition.addEvents()

    if competition.live:
        liveEvent.append(competition)

# liveEvent=competitionList

# Send email about live competitions
# sendHTMLEmail()

# Convert nested objects into a dictionnary for storage system
dictCompetitionList = []
for competition in competitionList:
    dictCompetitionList.append(competition.customDict())

with open("results.json", "w") as f: