Migrated from GitHub trtmn/mastodon-domain-block-exporter-script
Find a file
Stefan Bohacek b08faeafed
Formatting.
2024-06-26 20:42:38 -04:00
.gitignore Added .gitignore file. 2024-06-26 20:40:56 -04:00
README.md Added basic error handling. 2024-06-26 20:37:53 -04:00
script.py Formatting. 2024-06-26 20:42:38 -04:00
thumbnail-small.png Added thumbnails. 2024-06-26 20:19:47 -04:00
thumbnail.png Added thumbnails. 2024-06-26 20:19:47 -04:00

A screenshot of a command prompt with the output of the script: python script.py mastodon.social true false true, downloading domain blocks from mastodon.social...processing...saving to mastodon.social-domain-blocks.csv...done!

Mastodon domain block exporter script

Export domain blocks from a Mastodon server into an importable CSV file.

To use the script, download and run script.py following the format:

python script.py domain reject_media reject_reports obfuscate

From Mastodon's documentation:

  • reject_media: Whether media attachments should be rejected.
  • reject_reports: Whether reports from this domain should be rejected.
  • obfuscate: Whether to partially censor the domain when shown in public.

An example command to download domain blocks from mastodon.social with reject_media and obfuscate set to false, and reject_reports set to true.

python script.py mastodon.social true false true

Note that not all Mastodon servers make their domain block lists publicly available. In those cases you will see a 403: Forbidden error.