Ok. So Fixtures currently work like this
Code: Select all
In [1]: import footballscores
In [2]: fix = footballscores.Fixtures()
In [3]: fix.getCompetitions() ## <-- This lists the available competitions and their ID
Out[3]:
[{'id': u'competition-118996114', 'name': u'Premier League'},
{'id': u'competition-118996115', 'name': u'Championship'},
{'id': u'competition-118996116', 'name': u'League One'},
{'id': u'competition-118996117', 'name': u'League Two'},
{'id': u'competition-118996118', 'name': u'National League'},
{'id': u'competition-118996307', 'name': u'National League North'},
{'id': u'competition-118996308', 'name': u'National League South'},
{'id': u'competition-118998036', 'name': u'FA Cup'},
{'id': u'competition-118998039', 'name': u'FA Cup Qualifying'},
{'id': u'competition-118998037', 'name': u'EFL Cup'},
{'id': u'competition-118998038', 'name': u'EFL Trophy'},
{'id': u'competition-118998041', 'name': u'The FA Trophy'},
{'id': u'group-1', 'name': u'All English'},
{'id': u'competition-118996176', 'name': u'Scottish Premiership'},
{'id': u'competition-118996177', 'name': u'Scottish Championship'},
{'id': u'competition-118996178', 'name': u'Scottish League One'},
{'id': u'competition-118996179', 'name': u'Scottish League Two'},
{'id': u'competition-118999031', 'name': u'Highland League'},
{'id': u'competition-119003997', 'name': u'Lowland League'},
{'id': u'competition-118998098', 'name': u'Scottish Cup'},
{'id': u'competition-118998099', 'name': u'Scottish League Cup'},
{'id': u'competition-118998100', 'name': u'Scottish Challenge Cup'},
{'id': u'group-2', 'name': u'All Scottish'},
{'id': u'competition-118996207', 'name': u'Welsh Premier League'},
{'id': u'competition-118998129', 'name': u'Welsh Cup'},
{'id': u'competition-118996208', 'name': u'Welsh League Cup'},
{'id': u'group-3', 'name': u'All Welsh'},
{'id': u'competition-118996238', 'name': u'Irish Premiership'},
{'id': u'competition-118998043', 'name': u'Irish Cup'},
{'id': u'competition-118996240', 'name': u'Irish Premier Division'},
{'id': u'group-4', 'name': u'All Irish'},
{'id': u'competition-119001914', 'name': u'Africa Cup of Nations'},
{'id': u'competition-119001881', 'name': u'World Cup Qualifying - European'},
{'id': u'competition-119001943', 'name': u'International Friendlies'},
{'id': u'competition-119002004', 'name': u'Euro U21 Qualifying'},
{'id': u'competition-119001974', 'name': u'Under-21 Friendly'},
{'id': u'competition-999999985',
'name': u"Women's European Championship Qualifying"},
{'id': u'competition-999999987', 'name': u"Women's International Friendlies"},
{'id': u'competition-119002035', 'name': u'European Championship'},
{'id': u'group-6', 'name': u'All International'},
{'id': u'competition-119003064', 'name': u'Club World Cup'},
{'id': u'competition-118999958', 'name': u'Champions League'},
{'id': u'competition-118999989', 'name': u'Europa League'},
{'id': u'competition-999999995', 'name': u'Australian A-League'},
{'id': u'competition-119000919', 'name': u'Austrian Bundesliga'},
{'id': u'competition-119000924', 'name': u'Belgian First Division A'},
{'id': u'competition-999999996', 'name': u'Brazilian S\xe9rie A'},
{'id': u'competition-119000950', 'name': u'Danish Superliga'},
{'id': u'competition-119001012', 'name': u'Dutch Eredivisie'},
{'id': u'competition-119000955', 'name': u'Finnish Veikkausliiga'},
{'id': u'competition-119000981', 'name': u'French Ligue 1'},
{'id': u'competition-999999997', 'name': u'French Coupe de France'},
{'id': u'competition-119000986', 'name': u'German Bundesliga'},
{'id': u'competition-999999998', 'name': u'German DFB Cup'},
{'id': u'competition-119001136', 'name': u'Greek Superleague'},
{'id': u'competition-119001017', 'name': u'Italian Serie A'},
{'id': u'competition-999999999', 'name': u'Italian Coppa Italia'},
{'id': u'competition-119001043', 'name': u'Norwegian Tippeligaen'},
{'id': u'competition-119001048', 'name': u'Portuguese Primeira Liga'},
{'id': u'competition-999999990', 'name': u'Russian Premier League'},
{'id': u'competition-119001074', 'name': u'Spanish La Liga'},
{'id': u'competition-999999989', 'name': u'Spanish Copa del Rey'},
{'id': u'competition-119001079', 'name': u'Swedish Allsvenskan'},
{'id': u'competition-119001105', 'name': u'Swiss Super League'},
{'id': u'competition-119001110', 'name': u'Turkish Super Lig'},
{'id': u'competition-999999988',
'name': u'United States Major League Soccer'},
{'id': u'group-5', 'name': u'All European & World'},
{'id': u'competition-119004019', 'name': u"Women's Champions League"},
{'id': u'competition-119003989', 'name': u"Women's Super League 1"},
{'id': u'competition-999999993', 'name': u"Women's Super League 2"},
{'id': u'competition-118998132', 'name': u"The FA Women's Cup"},
{'id': u'competition-118998135', 'name': u"Women's League Cup"},
{'id': u'competition-999999991', 'name': u"Women's Premier North"},
{'id': u'competition-999999992', 'name': u"Women's Premier South"},
{'id': u'group-7', 'name': u'All Women'}]
In [5]: fix.getFixtures("competition-118996114") ## <-- This will get the fixtures for the Premier League
Out[5]:
[{'date': u'Saturday 21st January 2017',
'fixtures': [{'awayteam': u'Swansea City', 'hometeam': u'Liverpool'},
{'awayteam': u'Watford', 'hometeam': u'Bournemouth'},
{'awayteam': u'Everton', 'hometeam': u'Crystal Palace'},
{'awayteam': u'West Ham United', 'hometeam': u'Middlesbrough'},
{'awayteam': u'Manchester United', 'hometeam': u'Stoke City'},
{'awayteam': u'Sunderland', 'hometeam': u'West Bromwich Albion'},
{'awayteam': u'Tottenham Hotspur', 'hometeam': u'Manchester City'}]},
{'date': u'Sunday 22nd January 2017',
'fixtures': [{'awayteam': u'Leicester City', 'hometeam': u'Southampton'},
{'awayteam': u'Burnley', 'hometeam': u'Arsenal'},
{'awayteam': u'Hull City', 'hometeam': u'Chelsea'}]},
{'date': u'Tuesday 31st January 2017',
'fixtures': [{'awayteam': u'Watford', 'hometeam': u'Arsenal'},
{'awayteam': u'Crystal Palace', 'hometeam': u'Bournemouth'},
{'awayteam': u'Leicester City', 'hometeam': u'Burnley'},
{'awayteam': u'West Bromwich Albion', 'hometeam': u'Middlesbrough'},
{'awayteam': u'Tottenham Hotspur', 'hometeam': u'Sunderland'},
{'awayteam': u'Southampton', 'hometeam': u'Swansea City'},
{'awayteam': u'Chelsea', 'hometeam': u'Liverpool'}]},
{'date': u'Wednesday 1st February 2017',
'fixtures': [{'awayteam': u'Manchester City',
'hometeam': u'West Ham United'},
{'awayteam': u'Hull City', 'hometeam': u'Manchester United'},
{'awayteam': u'Everton', 'hometeam': u'Stoke City'}]},
{'date': u'Saturday 4th February 2017',
'fixtures': [{'awayteam': u'Arsenal', 'hometeam': u'Chelsea'},
{'awayteam': u'Sunderland', 'hometeam': u'Crystal Palace'},
{'awayteam': u'Bournemouth', 'hometeam': u'Everton'},
{'awayteam': u'Liverpool', 'hometeam': u'Hull City'},
{'awayteam': u'West Ham United', 'hometeam': u'Southampton'},
{'awayteam': u'Burnley', 'hometeam': u'Watford'},
{'awayteam': u'Stoke City', 'hometeam': u'West Bromwich Albion'},
{'awayteam': u'Middlesbrough', 'hometeam': u'Tottenham Hotspur'}]},
{'date': u'Sunday 5th February 2017',
'fixtures': [{'awayteam': u'Swansea City', 'hometeam': u'Manchester City'},
{'awayteam': u'Manchester United', 'hometeam': u'Leicester City'}]},
{'date': u'Saturday 11th February 2017',
'fixtures': [{'awayteam': u'Hull City', 'hometeam': u'Arsenal'},
{'awayteam': u'Watford', 'hometeam': u'Manchester United'},
{'awayteam': u'Everton', 'hometeam': u'Middlesbrough'},
{'awayteam': u'Crystal Palace', 'hometeam': u'Stoke City'},
{'awayteam': u'Southampton', 'hometeam': u'Sunderland'},
{'awayteam': u'West Bromwich Albion', 'hometeam': u'West Ham United'},
{'awayteam': u'Tottenham Hotspur', 'hometeam': u'Liverpool'}]},
{'date': u'Sunday 12th February 2017',
'fixtures': [{'awayteam': u'Chelsea', 'hometeam': u'Burnley'},
{'awayteam': u'Leicester City', 'hometeam': u'Swansea City'}]},
{'date': u'Monday 13th February 2017',
'fixtures': [{'awayteam': u'Manchester City', 'hometeam': u'Bournemouth'}]},
{'date': u'Saturday 25th February 2017',
'fixtures': [{'awayteam': u'Swansea City', 'hometeam': u'Chelsea'},
{'awayteam': u'Middlesbrough', 'hometeam': u'Crystal Palace'},
{'awayteam': u'Sunderland', 'hometeam': u'Everton'},
{'awayteam': u'Burnley', 'hometeam': u'Hull City'},
{'awayteam': u'Arsenal', 'hometeam': u'Southampton'},
{'awayteam': u'Bournemouth', 'hometeam': u'West Bromwich Albion'},
{'awayteam': u'West Ham United', 'hometeam': u'Watford'}]},
{'date': u'Sunday 26th February 2017',
'fixtures': [{'awayteam': u'Stoke City', 'hometeam': u'Tottenham Hotspur'},
{'awayteam': u'Manchester United', 'hometeam': u'Manchester City'}]},
{'date': u'Monday 27th February 2017',
'fixtures': [{'awayteam': u'Liverpool', 'hometeam': u'Leicester City'}]},
{'date': u'Saturday 4th March 2017',
'fixtures': [{'awayteam': u'Hull City', 'hometeam': u'Leicester City'},
{'awayteam': u'Arsenal', 'hometeam': u'Liverpool'},
{'awayteam': u'Bournemouth', 'hometeam': u'Manchester United'},
{'awayteam': u'Middlesbrough', 'hometeam': u'Stoke City'},
{'awayteam': u'Manchester City', 'hometeam': u'Sunderland'},
{'awayteam': u'Burnley', 'hometeam': u'Swansea City'},
{'awayteam': u'Everton', 'hometeam': u'Tottenham Hotspur'},
{'awayteam': u'Southampton', 'hometeam': u'Watford'},
{'awayteam': u'Crystal Palace', 'hometeam': u'West Bromwich Albion'},
{'awayteam': u'Chelsea', 'hometeam': u'West Ham United'}]},
{'date': u'Saturday 11th March 2017',
'fixtures': [{'awayteam': u'Leicester City', 'hometeam': u'Arsenal'},
{'awayteam': u'West Ham United', 'hometeam': u'Bournemouth'},
{'awayteam': u'Watford', 'hometeam': u'Chelsea'},
{'awayteam': u'Tottenham Hotspur', 'hometeam': u'Crystal Palace'},
{'awayteam': u'West Bromwich Albion', 'hometeam': u'Everton'},
{'awayteam': u'Swansea City', 'hometeam': u'Hull City'},
{'awayteam': u'Stoke City', 'hometeam': u'Manchester City'},
{'awayteam': u'Sunderland', 'hometeam': u'Middlesbrough'},
{'awayteam': u'Manchester United', 'hometeam': u'Southampton'}]},
{'date': u'Sunday 12th March 2017',
'fixtures': [{'awayteam': u'Burnley', 'hometeam': u'Liverpool'}]},
{'date': u'Saturday 18th March 2017',
'fixtures': [{'awayteam': u'Swansea City', 'hometeam': u'Bournemouth'},
{'awayteam': u'Watford', 'hometeam': u'Crystal Palace'},
{'awayteam': u'Hull City', 'hometeam': u'Everton'},
{'awayteam': u'Liverpool', 'hometeam': u'Manchester City'},
{'awayteam': u'Manchester United', 'hometeam': u'Middlesbrough'},
{'awayteam': u'Chelsea', 'hometeam': u'Stoke City'},
{'awayteam': u'Burnley', 'hometeam': u'Sunderland'},
{'awayteam': u'Southampton', 'hometeam': u'Tottenham Hotspur'},
{'awayteam': u'Arsenal', 'hometeam': u'West Bromwich Albion'},
{'awayteam': u'Leicester City', 'hometeam': u'West Ham United'}]},
{'date': u'Saturday 1st April 2017',
'fixtures': [{'awayteam': u'Manchester City', 'hometeam': u'Arsenal'},
{'awayteam': u'Tottenham Hotspur', 'hometeam': u'Burnley'},
{'awayteam': u'Crystal Palace', 'hometeam': u'Chelsea'},
{'awayteam': u'West Ham United', 'hometeam': u'Hull City'},
{'awayteam': u'Stoke City', 'hometeam': u'Leicester City'},
{'awayteam': u'Everton', 'hometeam': u'Liverpool'},
{'awayteam': u'West Bromwich Albion', 'hometeam': u'Manchester United'},
{'awayteam': u'Bournemouth', 'hometeam': u'Southampton'},
{'awayteam': u'Middlesbrough', 'hometeam': u'Swansea City'},
{'awayteam': u'Sunderland', 'hometeam': u'Watford'}]},
{'date': u'Tuesday 4th April 2017',
'fixtures': [{'awayteam': u'West Ham United', 'hometeam': u'Arsenal'},
{'awayteam': u'Stoke City', 'hometeam': u'Burnley'},
{'awayteam': u'Middlesbrough', 'hometeam': u'Hull City'},
{'awayteam': u'Sunderland', 'hometeam': u'Leicester City'},
{'awayteam': u'Tottenham Hotspur', 'hometeam': u'Swansea City'},
{'awayteam': u'West Bromwich Albion', 'hometeam': u'Watford'},
{'awayteam': u'Everton', 'hometeam': u'Manchester United'}]},
{'date': u'Wednesday 5th April 2017',
'fixtures': [{'awayteam': u'Manchester City', 'hometeam': u'Chelsea'},
{'awayteam': u'Crystal Palace', 'hometeam': u'Southampton'},
{'awayteam': u'Bournemouth', 'hometeam': u'Liverpool'}]},
{'date': u'Saturday 8th April 2017',
'fixtures': [{'awayteam': u'Chelsea', 'hometeam': u'Bournemouth'},
{'awayteam': u'Arsenal', 'hometeam': u'Crystal Palace'},
{'awayteam': u'Leicester City', 'hometeam': u'Everton'},
{'awayteam': u'Hull City', 'hometeam': u'Manchester City'},
{'awayteam': u'Burnley', 'hometeam': u'Middlesbrough'},
{'awayteam': u'Liverpool', 'hometeam': u'Stoke City'},
{'awayteam': u'Manchester United', 'hometeam': u'Sunderland'},
{'awayteam': u'Watford', 'hometeam': u'Tottenham Hotspur'},
{'awayteam': u'Southampton', 'hometeam': u'West Bromwich Albion'},
{'awayteam': u'Swansea City', 'hometeam': u'West Ham United'}]},
{'date': u'Saturday 15th April 2017',
'fixtures': [{'awayteam': u'Leicester City', 'hometeam': u'Crystal Palace'},
{'awayteam': u'Burnley', 'hometeam': u'Everton'},
{'awayteam': u'Chelsea', 'hometeam': u'Manchester United'},
{'awayteam': u'Arsenal', 'hometeam': u'Middlesbrough'},
{'awayteam': u'Manchester City', 'hometeam': u'Southampton'},
{'awayteam': u'Hull City', 'hometeam': u'Stoke City'},
{'awayteam': u'West Ham United', 'hometeam': u'Sunderland'},
{'awayteam': u'Bournemouth', 'hometeam': u'Tottenham Hotspur'},
{'awayteam': u'Swansea City', 'hometeam': u'Watford'}]},
{'date': u'Sunday 16th April 2017',
'fixtures': [{'awayteam': u'Liverpool',
'hometeam': u'West Bromwich Albion'}]},
{'date': u'Saturday 22nd April 2017',
'fixtures': [{'awayteam': u'Sunderland', 'hometeam': u'Arsenal'},
{'awayteam': u'Middlesbrough', 'hometeam': u'Bournemouth'},
{'awayteam': u'Manchester United', 'hometeam': u'Burnley'},
{'awayteam': u'Southampton', 'hometeam': u'Chelsea'},
{'awayteam': u'Watford', 'hometeam': u'Hull City'},
{'awayteam': u'Tottenham Hotspur', 'hometeam': u'Leicester City'},
{'awayteam': u'Crystal Palace', 'hometeam': u'Liverpool'},
{'awayteam': u'West Bromwich Albion', 'hometeam': u'Manchester City'},
{'awayteam': u'Stoke City', 'hometeam': u'Swansea City'},
{'awayteam': u'Everton', 'hometeam': u'West Ham United'}]},
{'date': u'Saturday 29th April 2017',
'fixtures': [{'awayteam': u'Burnley', 'hometeam': u'Crystal Palace'},
{'awayteam': u'Chelsea', 'hometeam': u'Everton'},
{'awayteam': u'Swansea City', 'hometeam': u'Manchester United'},
{'awayteam': u'Manchester City', 'hometeam': u'Middlesbrough'},
{'awayteam': u'Hull City', 'hometeam': u'Southampton'},
{'awayteam': u'West Ham United', 'hometeam': u'Stoke City'},
{'awayteam': u'Bournemouth', 'hometeam': u'Sunderland'},
{'awayteam': u'Arsenal', 'hometeam': u'Tottenham Hotspur'},
{'awayteam': u'Liverpool', 'hometeam': u'Watford'},
{'awayteam': u'Leicester City', 'hometeam': u'West Bromwich Albion'}]},
{'date': u'Saturday 6th May 2017',
'fixtures': [{'awayteam': u'Manchester United', 'hometeam': u'Arsenal'},
{'awayteam': u'Stoke City', 'hometeam': u'Bournemouth'},
{'awayteam': u'West Bromwich Albion', 'hometeam': u'Burnley'},
{'awayteam': u'Middlesbrough', 'hometeam': u'Chelsea'},
{'awayteam': u'Sunderland', 'hometeam': u'Hull City'},
{'awayteam': u'Watford', 'hometeam': u'Leicester City'},
{'awayteam': u'Southampton', 'hometeam': u'Liverpool'},
{'awayteam': u'Crystal Palace', 'hometeam': u'Manchester City'},
{'awayteam': u'Everton', 'hometeam': u'Swansea City'},
{'awayteam': u'Tottenham Hotspur', 'hometeam': u'West Ham United'}]},
{'date': u'Saturday 13th May 2017',
'fixtures': [{'awayteam': u'Burnley', 'hometeam': u'Bournemouth'},
{'awayteam': u'Hull City', 'hometeam': u'Crystal Palace'},
{'awayteam': u'Watford', 'hometeam': u'Everton'},
{'awayteam': u'Leicester City', 'hometeam': u'Manchester City'},
{'awayteam': u'Southampton', 'hometeam': u'Middlesbrough'},
{'awayteam': u'Arsenal', 'hometeam': u'Stoke City'},
{'awayteam': u'Swansea City', 'hometeam': u'Sunderland'},
{'awayteam': u'Manchester United', 'hometeam': u'Tottenham Hotspur'},
{'awayteam': u'Chelsea', 'hometeam': u'West Bromwich Albion'},
{'awayteam': u'Liverpool', 'hometeam': u'West Ham United'}]},
{'date': u'Sunday 21st May 2017',
'fixtures': [{'awayteam': u'Everton', 'hometeam': u'Arsenal'},
{'awayteam': u'West Ham United', 'hometeam': u'Burnley'},
{'awayteam': u'Sunderland', 'hometeam': u'Chelsea'},
{'awayteam': u'Tottenham Hotspur', 'hometeam': u'Hull City'},
{'awayteam': u'Bournemouth', 'hometeam': u'Leicester City'},
{'awayteam': u'Middlesbrough', 'hometeam': u'Liverpool'},
{'awayteam': u'Crystal Palace', 'hometeam': u'Manchester United'},
{'awayteam': u'Stoke City', 'hometeam': u'Southampton'},
{'awayteam': u'West Bromwich Albion', 'hometeam': u'Swansea City'},
{'awayteam': u'Manchester City', 'hometeam': u'Watford'}]}]
Hope that helps.