Skip to content

Instantly share code, notes, and snippets.

@felipebastosweb
Last active January 1, 2023 20:44
Show Gist options
  • Save felipebastosweb/7b12b1bca0fc16afe892a12e6c767f99 to your computer and use it in GitHub Desktop.
Save felipebastosweb/7b12b1bca0fc16afe892a12e6c767f99 to your computer and use it in GitHub Desktop.
import time
import requests
total_pages = 1724
csv_file = open('./double_history.csv', 'a+')
# latest to current pages
for page in reversed(range(1, total_pages)):
result_json = (requests.get("https://blaze.com/api/roulette_games/history?page=" + str(page))).json()
# more latest to minus latest results of page
resultados = reversed(result_json['records'])
for resultado in resultados:
sorted = resultado['color'][0] +';'+ str(resultado['roll']) +';'+ resultado['created_at']
csv_file.write('\n' + sorted )
time.sleep(2)
csv_file.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment