mirror of
https://github.com/miguelmota/cointop
synced 2024-11-14 18:12:57 +00:00
14 lines
292 B
Python
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)
|