Last active
January 1, 2023 20:44
-
-
Save felipebastosweb/7b12b1bca0fc16afe892a12e6c767f99 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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