Skip to content

Instantly share code, notes, and snippets.

@kareiva
Created June 1, 2022 14:41
Show Gist options
  • Save kareiva/9d1220df14bed4f5cd6fada2f9782bc0 to your computer and use it in GitHub Desktop.
Save kareiva/9d1220df14bed4f5cd6fada2f9782bc0 to your computer and use it in GitHub Desktop.
Check your position on the tinygs.com website
#!/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