Skip to content

Instantly share code, notes, and snippets.

@MichaelAquilina
Created June 25, 2014 16:26
Show Gist options
  • Save MichaelAquilina/745c6df61e4714d446b4 to your computer and use it in GitHub Desktop.
Save MichaelAquilina/745c6df61e4714d446b4 to your computer and use it in GitHub Desktop.
View scores of current games in the Worldcup
#! /usr/bin/python
# View the scores of matches currently in progress
import requests
req = requests.get('http://worldcup.sfg.io/matches')
for match in [m for m in req.json() if m['status'] == 'in progress']:
print match['home_team']['country'], match['home_team']['goals'], 'v', match['away_team']['country'], match['away_team']['goals']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment