Last active
June 15, 2018 18:29
-
-
Save Santiago-j-s/933ef1c764a9b0c5212f58385ca4474a to your computer and use it in GitHub Desktop.
resultados.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import requests | |
partidos = requests.get('http://worldcup.sfg.io/matches').json() | |
[ | |
print( | |
p['home_team']['country'], p['home_team']['goals'], | |
'x', | |
p['away_team']['country'], p['away_team']['goals'], | |
'# finalizado' if p['status'] == 'completed' else '' | |
) for p in partidos if p['status'] in ('completed', 'in progress') | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment