return match details
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ def get_live_cricket_matches()-> str: #it's import to specify the return type
|
|
29 |
if "date" in match and match["date"].startswith(today):
|
30 |
if match.get("matchType") == "t20" or match.get("matchType") == "odi":
|
31 |
match_info.append(
|
32 |
-
f"{' vs '.join(match.get('teams', []))} -- {match.get('status')}"
|
33 |
)
|
34 |
return "\n".join(match_info)
|
35 |
return {"error": "Unable to fetch match data"}
|
|
|
29 |
if "date" in match and match["date"].startswith(today):
|
30 |
if match.get("matchType") == "t20" or match.get("matchType") == "odi":
|
31 |
match_info.append(
|
32 |
+
f"{' vs '.join(match.get('teams', []))} ({match.get('matchType')}) -- {match.get('status')} -- at {match.get('venue')}"
|
33 |
)
|
34 |
return "\n".join(match_info)
|
35 |
return {"error": "Unable to fetch match data"}
|