Created
June 1, 2022 14:41
-
-
Save kareiva/9d1220df14bed4f5cd6fada2f9782bc0 to your computer and use it in GitHub Desktop.
Check your position on the tinygs.com website
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 python | |
import requests | |
url = "https://api.tinygs.com/v1/stations" | |
resp = requests.get(url) | |
data = resp.json() | |
pos_all = 0 | |
pos_active = 0 | |
for station in data: | |
pos_all = pos_all + 1 | |
if station['status'] == 1: | |
pos_active = pos_active + 1 | |
if station['name'] == 'LY2EN_GS': | |
print('LY2EN_GS station globally is at position ' + str(pos_active) + '')% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment