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(:+)

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

Follow

@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