The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,839 other subscribers

Some Twitter internals after I found GitHub – offish/twitter-broadcast-downloader: Download Twitter broadcasts/lives

Posted by jpluimers on 2026/04/30

Found this while trying to find the source from which I constructed this Bookmarklet which from a Tweet URL returns the JSON metadata which has all the links to media (like images and videos) as it failed for broadcasts:

javascript:{ tweetID = document.location.href.split('/').filter(e => e).slice(-1); url = new URL(`https://cdn.syndication.twimg.com/tweet-result?id=${tweetID}&token=!`); open(url); }

I could not find that back, but did find [Wayback/Archive] GitHub – offish/twitter-broadcast-downloader: Download Twitter broadcasts/lives via these query steps:

  1. [Wayback/Archive] get video url from twitter broadcast at DuckDuckGo
  2. [Wayback/Archive] GitHub – tyrell/Twitter-broadcast-downloader: a script that allows you to download Twitter/X broadcast details and the associated M3U8 file. You can input either the Twitter Broadcast URL or ID directly.
  3. [Wayback/Archive] offish/twitter-broadcast-downloader at DuckDuckGo
  4. [Wayback/Archive] GitHub – offish/twitter-broadcast-downloader: Download Twitter broadcasts/lives

Note to self: update this post when I see a Twitter broadcast.

The main logic to get the link to the broadcast .m3u8 file seems to be in [Wayback/Archive] twitter-broadcast-downloader/downloader/listener.js at main · offish/twitter-broadcast-downloader · GitHub (raw file [Wayback/Archive] listener.js):

(function () {
    var origin = XMLHttpRequest.prototype.open;
    XMLHttpRequest.prototype.open = function () {
        this.addEventListener("load", function () {
            var t = this.responseText;

            if (t.includes(".m3u8") && (t.includes("playlist_") || t.includes("master_dynamic_"))) {
                console.error(t);
            }
        });
        origin.apply(this, arguments);
    };
})();

You can use ffmpeg to download the complete video as it knows how to handle .m3u8 files (which are the UTF-8 variation of .m3u files).

Oh BTW: to display any Tweet, you just need the tweetId and put it into https://x.com/jack/status/tweetId or https://twitter.com/jack/status/tweetId

So instead of https://x.com/jack/status/20 you get https://twitter.com/i/status/20 or https://x.com/i/status/20

There is no account [Wayback/Archive] Twitter / i (archives from 2007) or [Wayback/Archive] X / i.

In 2025, some of the Twitter mobile clients started using https://x.com/jack/status/tweetId (with a proper tweetId value) as sharing links instead of including the real profile handle.

This also makes it easy to find the actual profile of someone who has changed profile handle: just start with https://x.com/jack/status/tweetId with the proper tweetId value and Twitter will redirect it to a proper URL including the profile handle.

--jeroen

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.