Twitter URLs in posts were replaced with Nitter equivalents using this one-off script:
import asyncio
import re
from server.infrastructure.content import aiter_blog_posting_paths
async def main() -> None:
async for _, path in aiter_blog_posting_paths():
content = path.read_text()
lines = content.splitlines(keepends=True)
for i, line in enumerate(lines):
lines[i] = re.sub("https://twitter.com", "https://nitter.net", line)
path.write_text("".join(lines))
if __name__ == "__main__":
asyncio.run(main())
Twitter URLs in posts were replaced with Nitter equivalents using this one-off script: