2
0
mirror of https://github.com/miguelmota/cointop synced 2024-11-14 18:12:57 +00:00
cointop/meta/metrics/homebrew_metrics.py
2020-11-15 18:11:31 -08:00

14 lines
292 B
Python

import requests
days = 30
# https://formulae.brew.sh/api/formula/cointop.json
url = f'https://formulae.brew.sh/api/analytics/install/{days}d.json'
r = requests.get(url)
data = r.json()
entry = [x for x in data['items'] if x['formula'] == 'cointop'][0]
total = entry['count']
print(total)