Skip to content

Instantly share code, notes, and snippets.

@gmariette
Created November 14, 2020 20:05
Show Gist options
  • Select an option

  • Save gmariette/b4deb22c82e719fca9b2246a9caa7a8c to your computer and use it in GitHub Desktop.

Select an option

Save gmariette/b4deb22c82e719fca9b2246a9caa7a8c to your computer and use it in GitHub Desktop.
for i, item in enumerate(tournament_idx_lst[:-1]):
tournament_name = rows[item].find("td", class_="t-name").text.strip()
if "Pro Tennis" in tournament_name or "Futures" in tournament_name or "challenger" in tournament_name:
continue
if not tournament_dict.get(tournament_name):
tournament_dict[tournament_name] = {}
tournament_dict[tournament_name][current_date] = []
for c in range (item+1, tournament_idx_lst[i+1], 2):
tournament_dict[tournament_name][current_date].append(getPlayersFullName(rows[c].find("td", class_="t-name").a['href']) + ' vs ' + getPlayersFullName(rows[c+1].find("td", class_="t-name").a['href']))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment