nangelov commited on
Commit
d21f9e0
·
verified ·
1 Parent(s): 4381f4e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -33,10 +33,11 @@ def get_Competition_Code(competition_name: str)-> str:
33
  "SA": "Serie A",
34
  "PL": "Premier League"
35
  }
36
-
37
  # Iterate through the dictionary to find the matching competition name.
38
  for code, name in competitions.items():
39
  if name.lower() == competition.lower():
 
40
  return code
41
  # Return None if no match is found.
42
  return None
@@ -55,7 +56,7 @@ def search_Competition_Matches_Results_By_Date(competition_name: str, match_date
55
 
56
  # Create the URL using an f-string
57
  url = f'https://api.football-data.org/v4/competitions/{competition_code}/matches?date={date_str}'
58
-
59
  # Set up the headers with your API token.
60
  headers = {
61
  'X-Auth-Token': FOOTBALL_DATA_TOKEN
 
33
  "SA": "Serie A",
34
  "PL": "Premier League"
35
  }
36
+ print(competition_name)
37
  # Iterate through the dictionary to find the matching competition name.
38
  for code, name in competitions.items():
39
  if name.lower() == competition.lower():
40
+ print(code)
41
  return code
42
  # Return None if no match is found.
43
  return None
 
56
 
57
  # Create the URL using an f-string
58
  url = f'https://api.football-data.org/v4/competitions/{competition_code}/matches?date={date_str}'
59
+ print(url)
60
  # Set up the headers with your API token.
61
  headers = {
62
  'X-Auth-Token': FOOTBALL_DATA_TOKEN