Update numbers (and fix update-numbers.py)

Kudos to David Morley for the help:
https://gitlab.com/diasporg/poduptime/-/issues/69
This commit is contained in:
Alexander Batischev 2024-01-01 22:30:19 +03:00
parent 33cd3caa25
commit 00b395479c
No known key found for this signature in database
GPG key ID: 356961A20C8BFD03
2 changed files with 69 additions and 65 deletions

View file

@ -1,115 +1,115 @@
{
"list": {
"lastUpdate": "03 Dec 2023",
"lastUpdate": "01 Jan 2024",
"diaspora": {
"population": "349\u00a0387",
"activeUsers": "37\u00a0690",
"podsNum": "93"
"population": "657\u00a0194",
"activeUsers": "34\u00a0561",
"podsNum": "90"
},
"friendica": {
"population": "22\u00a0154",
"activeUsers": "5\u00a0536",
"podsNum": "357"
"population": "20\u00a0269",
"activeUsers": "5\u00a0049",
"podsNum": "340"
},
"hubzilla": {
"population": "4\u00a0738",
"activeUsers": "1\u00a0560",
"podsNum": "68"
"population": "4\u00a0782",
"activeUsers": "1\u00a0354",
"podsNum": "67"
},
"mastodon": {
"population": "8\u00a0974\u00a0351",
"activeUsers": "3\u00a0343\u00a0312",
"podsNum": "11\u00a0167"
"population": "8\u00a0931\u00a0951",
"activeUsers": "3\u00a0056\u00a0556",
"podsNum": "10\u00a0971"
},
"gnusocial": {
"population": "392",
"activeUsers": "318",
"podsNum": "19"
"population": "345",
"activeUsers": "267",
"podsNum": "18"
},
"pleroma": {
"population": "123\u00a0411",
"activeUsers": "24\u00a0589",
"podsNum": "1\u00a0058"
"population": "123\u00a0568",
"activeUsers": "22\u00a0212",
"podsNum": "1\u00a0024"
},
"misskey": {
"population": "632\u00a0764",
"activeUsers": "26\u00a0199",
"podsNum": "1\u00a0130"
"population": "650\u00a0234",
"activeUsers": "25\u00a0876",
"podsNum": "1\u00a0128"
},
"peertube": {
"population": "304\u00a0916",
"activeUsers": "67\u00a0707",
"podsNum": "1\u00a0187"
"population": "280\u00a0805",
"activeUsers": "59\u00a0160",
"podsNum": "1\u00a0206"
},
"pixelfed": {
"population": "193\u00a0957",
"activeUsers": "62\u00a0636",
"podsNum": "513"
"population": "200\u00a0582",
"activeUsers": "62\u00a0954",
"podsNum": "505"
},
"funkwhale": {
"population": "9\u00a0613",
"activeUsers": "2\u00a0240",
"podsNum": "116"
"population": "9\u00a0890",
"activeUsers": "2\u00a0191",
"podsNum": "109"
},
"writefreely": {
"population": "88\u00a0393",
"activeUsers": "19\u00a0486",
"podsNum": "523"
"population": "96\u00a0456",
"activeUsers": "23\u00a0992",
"podsNum": "522"
},
"plume": {
"population": "26\u00a0323",
"population": "26\u00a0517",
"activeUsers": "1",
"podsNum": "46"
},
"mobilizon": {
"population": "32\u00a0910",
"activeUsers": "20",
"podsNum": "112"
"population": "33\u00a0274",
"activeUsers": "3",
"podsNum": "104"
},
"lemmy": {
"population": "1\u00a0989\u00a0845",
"activeUsers": "120\u00a0030",
"podsNum": "952"
"population": "1\u00a0965\u00a0542",
"activeUsers": "136\u00a0853",
"podsNum": "875"
},
"gotosocial": {
"population": "1\u00a0357",
"activeUsers": "43",
"podsNum": "699"
"population": "1\u00a0459",
"activeUsers": "47",
"podsNum": "718"
},
"owncast": {
"population": "247",
"activeUsers": "247",
"podsNum": "247"
"population": "235",
"activeUsers": "235",
"podsNum": "235"
},
"bookwyrm": {
"population": "23\u00a0007",
"activeUsers": "10\u00a0914",
"population": "24\u00a0686",
"activeUsers": "11\u00a0524",
"podsNum": "106"
},
"microblogpub": {
"population": "67",
"population": "71",
"activeUsers": "1",
"podsNum": "67"
"podsNum": "71"
},
"akkoma": {
"population": "15\u00a0596",
"activeUsers": "6\u00a0715",
"podsNum": "574"
"population": "15\u00a0940",
"activeUsers": "6\u00a0496",
"podsNum": "568"
},
"calckey": {
"population": "2\u00a0542",
"activeUsers": "2\u00a0155",
"podsNum": "42"
"firefish": {
"population": "21\u00a0561",
"activeUsers": "16\u00a0619",
"podsNum": "445"
},
"hometown": {
"population": "16\u00a0827",
"activeUsers": "8\u00a0824",
"podsNum": "159"
"population": "15\u00a0913",
"activeUsers": "7\u00a0718",
"podsNum": "157"
},
"fediverse": {
"population": "12\u00a0812\u00a0797",
"activeUsers": "3\u00a0740\u00a0223",
"podsNum": "19\u00a0235"
"population": "13\u00a0081\u00a0274",
"activeUsers": "3\u00a0473\u00a0669",
"podsNum": "19\u00a0305"
}
}
}

View file

@ -52,7 +52,11 @@ class StatsFetcher:
query = '{ nodes(status: "UP", softwarename: "' \
+ softwarename \
+ '") { total_users, active_users_halfyear } }'
response = self.session.post('https://api.fediverse.observer/', data={'query': query})
headers = {'Accept-Language': 'en-GB,en;q=0.5'}
response = self.session.post(
'https://api.fediverse.observer/',
json={'query': query},
headers=headers)
return response.json().get('data', {}).get('nodes', [])
def __calculate_stats_for_software(self, softwarename):