TikTok RSS Flat - Generate RSS feeds from TikTok using GitHub OCTO Flat Data

Using GitHub Flat Data, GitHub Actions and GitHub Pages to fix the internet

Gen-X nerds continue to ruin the internet for Gen-Z by implementing RSS feeds for TikTok 😁

TikTok RSS Flat Logo

I was really intrigued by the launch of GitHub OCTO Flat Data, having already been a longtime fan of Simon Willison’s work (all the way back to the early days of Django). There is something very powerful in there that is not obvious on first look. Connecting it to Low-Code platforms could unleash lots of crazy fabulous new ideas.

I’m also an old curmudgeon who has clung fiercly to RSS despite the best attempts of Google, Twitter, Facebook and old media to kill it. I get breaking news via Twitter and gave up on Faecbook aeons ago, whilst the vast majority of the media I consume online is via hundreds of RSS subscriptions on Feedly.

In fact, I’m so obnoxious about this that in recent years I’ve built an array of tiny tools to add (or re-add) RSS support to various sites/systems that I read including Vimeo, The Far Side, The Tokyo Marathon, The South China Morning Post, The Irish Independent, Cork’s Evening Echo, Cork County Council news, World Mountain Running Association, the HSE Digital Blog and Microcosm.

But all of those have been built on AWS Lambda using the Serverless framework.

I wondered if the same was possible using Flat Data to make it very low effort for anyone else to use and it turns out it’s pretty easy.

My first attempt to do it all in Deno (Node.js mavens look away now) on the Tokyo Marathon web-site took almost no time. There’s a basic functional setup here. But that works as one repo per RSS feed which is wasteful.

I then wanted to try TikTok which is a lot more complex as it’s a SPA with no scrapable data from its webapp. I initially failed to do it in straight Deno as my complete lack of knowledge of it meant I couldn’t get the Node.js TikTok Scraper running under it. I did however manage to make a tiny change which allows that scraper to run directly in Node.js under AWS Lambda without native code problems from jsdom/canvas.

So back to good old Python I went to do it using Flat Data and it was all very quick.

TikTok RSS Flat generates usable RSS feeds from TikTok using the unoffical TikTokApi Python library to extract information about user videos from TikTok as JSON and generate RSS feeds for each user you are interested in.

To get your own instance running is simple:

It’s set to run once per hour and generates one RSS XML file per user in the rss output directory.

You then subscribe to each feed in Feedly or another feed reader using a GitHub Pages URL. Those URLs are constructed like so. E.g.:

And that’s it. Less than 50 lines of beginner-level Python to drag TikTok out of its silo and into the Open Web.

Wouldn’t it be amazing to have a standardized approach for this where everyone could share their Scrapers+RSSGenerators, remove all the complex language around it, and re-Open the web?

As Tabitha says - Because it’s my business.

Conor O'Neill

Tech guy who likes running slowly

Bandon, Cork, Ireland https://conoroneill.net