Skip to content

Instantly share code, notes, and snippets.

@NandoKstroNet
Forked from fmasanori/jogos.py
Created June 19, 2014 00:49
Show Gist options
  • Save NandoKstroNet/b487e4a13b942f2a510d to your computer and use it in GitHub Desktop.
Save NandoKstroNet/b487e4a13b942f2a510d 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