Skip to content

Instantly share code, notes, and snippets.

@jtemporal
Created June 16, 2018 13:32
Show Gist options
  • Save jtemporal/4b8e7d437f423763099c3ddaacd4cb70 to your computer and use it in GitHub Desktop.
Save jtemporal/4b8e7d437f423763099c3ddaacd4cb70 to your computer and use it in GitHub Desktop.
pegar os resultados da copa
# créditos: https://twitter.com/Denommus/status/1007407580132585472 e @fmasanori
import requests
jogos = requests.get('http://worldcup.sfg.io/matches').json()
[print(j['home_team']['country'], j['home_team']['goals'], 'x', j['away_team']['country'], j['away_team']['goals'])
for j in jogos if j['status'] in ('completed', 'in progress')]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment