mirror of https://github.com/miguelmota/cointop
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
292 B
Python
14 lines
292 B
Python
4 years ago
|
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)
|