mirror of
https://github.com/Findus23/acronomy.git
synced 2024-09-19 15:33:45 +02:00
22 lines
521 B
Python
22 lines
521 B
Python
|
from datetime import date
|
||
|
|
||
|
import requests
|
||
|
|
||
|
from acronomy.settings import MATOMO_API_KEY
|
||
|
|
||
|
|
||
|
def fetch_matomo_pages():
|
||
|
url = "https://matomo.lw1.at/index.php" \
|
||
|
"?period=range" \
|
||
|
"&date=2010-01-01," + str(date.today()) + \
|
||
|
"&filter_limit=-1" \
|
||
|
"&flat=1" \
|
||
|
"&format=JSON" \
|
||
|
"&idSite=29" \
|
||
|
"&method=Actions.getPageUrls" \
|
||
|
"&module=API" \
|
||
|
f"&token_auth={MATOMO_API_KEY}"
|
||
|
print(url)
|
||
|
r = requests.get(url)
|
||
|
return r.json()
|