Follow

Ruby source code 

# Prints number of users across Mastodon instances

require 'open-uri'
require 'nokogiri'

doc=Nokogiri(open('instances.mastodon.xyz/').read)

puts doc.css('tr').map { |tr|
td = tr.css('td')[1]
(td && td.text).to_i
}.inject(:+)

· · Web · 0 · 2 · 3

@plexus well, it's important to say that not EVERY instance is on the site

So, you can only get a count of "users referenced by instances.mastodon.xyz" but clearly not everyone

@plexus I think it'd be way more interesting to try getting all the users federated by a given instance, the number will maybe be more accurate

@plexus thanks for the content warning! Ruby syntax considered nsfw?

@pesterhazy seemed friendlier than just shoving a blob of code in people's timeline

Sign in to participate in the conversation
Mastodon

The original server operated by the Mastodon gGmbH non-profit