diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..09b0c07 Binary files /dev/null and b/.DS_Store differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..c14b388 --- /dev/null +++ b/index.html @@ -0,0 +1,70 @@ + + + + + + Liste d'Équipes + + + + +
+

Liste d'Équipes

+ + +
+ + + + + + + + + diff --git a/index.py b/index.py index e69de29..5c96162 100644 --- a/index.py +++ b/index.py @@ -0,0 +1,63 @@ +import requests +import json + +# URL du JSON +url = "https://cdn.nba.com/static/json/staticData/scheduleLeagueV2.json" + +# Obtenir le contenu JSON de l'URL +response = requests.get(url) +data = response.json() + +# Liste des matchs avec les informations demandées +matches_info = [] + +for game_date in data['leagueSchedule']['gameDates']: + for game in game_date['games']: + match_info = { + 'gameDateTimeUTC': game['gameDateTimeUTC'], + 'weekNumber': game['weekNumber'], + 'arenaName': game['arenaName'], + 'seriesText': game['seriesText'], + 'hometeamName': game['homeTeam']['teamName'], + 'awayteamName': game['awayTeam']['teamName'], + } + matches_info.append(match_info) + +# Afficher la liste des matchs +#print(matches_info) + +teams_dict = { + 1: "Lakers", + 2: "Heat", + 3: "Warriors", + 4: "Celtics", + 5: "Spurs", + 6: "Knicks", + 7: "Pistons", + 8: "Magic", + 9: "Suns", + 10: "Pacers", + 11: "Jazz", + 12: "Trail Blazers", + 13: "Raptors", + 14: "Mavericks", + 15: "Bucks", + 16: "Thunder", + 17: "Bulls", + 18: "Pelicans", + 19: "Rockets", + 20: "Kings", + 21: "Clippers", + 22: "Cavaliers", + 23: "Hawks", + 24: "Grizzlies", + 25: "Nuggets", + 26: "Hornets", + 27: "76ers", + 28: "Wizards", + 29: "Timberwolves", + 30: "Nets" +} + +# Affichage du dictionnaire +print(teams_dict)