Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added teams.py and seasons.py #70

Draft
wants to merge 31 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b450b0c
Update series.py
killuazoldyckreal Feb 23, 2025
91a8fd9
Create seasons.py
killuazoldyckreal Feb 23, 2025
6d46ebe
Update seasons.py
killuazoldyckreal Feb 23, 2025
859a8d9
Update seasons.py
killuazoldyckreal Feb 23, 2025
7e1511e
Update exceptions.py
killuazoldyckreal Feb 23, 2025
be95e51
Update series.py
killuazoldyckreal Feb 23, 2025
a97b9c8
Update seasons.py
killuazoldyckreal Feb 23, 2025
6e55bc1
Update seasons.py
killuazoldyckreal Feb 23, 2025
308157e
Update seasons.py
killuazoldyckreal Feb 23, 2025
0efcfcf
Create teams.py
killuazoldyckreal Feb 23, 2025
a76522c
Update seasons.py
killuazoldyckreal Feb 23, 2025
70b8901
Update series.py
killuazoldyckreal Feb 23, 2025
df4cc60
Update seasons.py
killuazoldyckreal Mar 5, 2025
ff1baaa
Update match.py
killuazoldyckreal Mar 5, 2025
81a4c2d
Update match.py
killuazoldyckreal Mar 5, 2025
dc64db4
Update match.py
killuazoldyckreal Mar 5, 2025
b25694f
Update match.py
killuazoldyckreal Mar 5, 2025
92ab92a
Update match.py
killuazoldyckreal Mar 5, 2025
16a26d4
Update match.py
killuazoldyckreal Mar 5, 2025
0c6b3e9
update
killuazoldyckreal Mar 6, 2025
4eac73d
bug fixes
killuazoldyckreal Mar 6, 2025
2adeb89
bug fixes
killuazoldyckreal Mar 6, 2025
11b3afd
bug fixes
killuazoldyckreal Mar 6, 2025
f68783e
Fixed NoneType error
killuazoldyckreal Mar 7, 2025
db6fcf8
update "Live" class
killuazoldyckreal Mar 7, 2025
fc89b85
update
killuazoldyckreal Mar 7, 2025
d6b9d34
Update misc.py
killuazoldyckreal Mar 8, 2025
7eab1c2
Create livematches.py
killuazoldyckreal Mar 8, 2025
f034fe6
Update livematches.py
killuazoldyckreal Mar 8, 2025
5e77e5d
Update livematches.py
killuazoldyckreal Mar 8, 2025
46c0a74
Update livematches.py
killuazoldyckreal Mar 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update
  • Loading branch information
killuazoldyckreal authored Mar 7, 2025
commit fc89b85b50cbb9cc77e5d61896714b17e8a584e2
5 changes: 3 additions & 2 deletions espncricinfo/misc.py
Original file line number Diff line number Diff line change
@@ -11,8 +11,8 @@ def __init__(self, batting_data):
self.player_id = int(batting_data.get("player_id") or 0)
self.runs = int(batting_data.get("runs") or 0)
self.sixes = int(batting_data.get("sixes") or 0)
self.strike_rate = float(batting_data.get("strike_rate") or 0.0)
self.team_id = int(batting_data.get("team_id") or 0)
self.strike_rate = batting_data.get("strike_rate") or "0.0"

def __repr__(self):
return f"BatterPlaying(Player ID: {self.player_id}, Runs: {self.runs}, Balls Faced: {self.balls_faced})"
@@ -191,6 +191,7 @@ def __init__(self, json_data):
self.batting = [ BatterPlaying(data) for data in json_data['batting'] ]
self.bowling = [ BowlerPlaying(data) for data in json_data['bowling'] ]
self.status = json_data['status']
self.is_finished = True if (json_data['event_name']=='complete') else False
self.ball_limit = int(json_data.get('innings', {}).get('ball_limit') or 0)
self.balls = int(json_data.get('innings', {}).get('balls') or 0)
self.current_inning = int(json_data.get('innings', {}).get('innings_number') or 0)
@@ -203,4 +204,4 @@ def __init__(self, json_data):
self.runs = int(json_data.get('innings', {}).get('runs') or 0)
self.target = int(json_data.get('innings', {}).get('target') or 0)
self.team_id = int(json_data.get('innings', {}).get('team_id') or 0)
self.wickets = int(json_data.get('innings', {}).get('wickets') or 0)
self.wickets = int(json_data.get('innings', {}).get('wickets') or 0)