Skip to content

Instantly share code, notes, and snippets.

@Ismael-VC
Forked from fmasanori/jogos.py
Created June 19, 2014 13:48
Show Gist options
  • Save Ismael-VC/781d1fd4194a999256c0 to your computer and use it in GitHub Desktop.
Save Ismael-VC/781d1fd4194a999256c0 to your computer and use it in GitHub Desktop.
import urllib.request
import json
resp = urllib.request.urlopen('http://worldcup.sfg.io/matches').read()
for jogo in json.loads(resp.decode('utf-8')):
if jogo['status'] == 'completed':
print (jogo['home_team']['country'], jogo['home_team']['goals'], 'x', jogo['away_team']['country'], jogo['away_team']['goals'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment