New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Twitter Spaces streams #29145
Comments
It would really be great if this is supported. More Twitter Spaces links to inspect: |
this would be extra useful as a Twitter Spaces recording only lives for 30 days, afterwards it's lost. |
|
I believe it's possible for the creator/moderator of a Twitter spaces session to optionally record that live session and share the recording afterwards via a Tweet. Users will see a player in the Twitter UI. I'm not entirely sure, but I believe "recording" is a beta feature that isn't rolled out yet to everyone (at least I couldn't find this recording option when I just tried to create a Twitter Spaces session). So I couldn't produce a recording myself. However, in this recording the creator/moderator of the session says (around 7:01): "This is recorded. Twitter allows you to record. So you might be able to catch up later. My understand is the recording will last for 30 days. I have no idea how to download and save them anywhere else". I'm not sure if that expiration for recordings is true or not, I could not find any docs confirming or not confirming this. However, it's definitely true that Twitter Spaces sessions can be recorded (though not yet by any user) and if you search on Twitter you will find many links to such recordings. Hope this helps - this is all I know. Again, here's an example of a recorded session: |
This user ("Andrew Brown") is the creator/owner/moderator of that Twitter spaces live session. He started the live session. As owner of the session he had an option in the UI to record the session. When the session ended he was able to share the link to the recording via a Tweet. Only the owner of the session can record it. Other participants (listeners) can't record a session that they don't own. (With my comment that not all users can record yet, I meant that not everyone who starts/owns a live session can see that "record" button yet due to Beta). |
awesome! |
Just dropping a note here: even Spaces that don’t have the recording option turned on can still be downloaded from the servers afterwards. Twitter will retain copies of all streams for up to 120 days for review purposes. I know some people have been downloading the full streams using the |
what version is this in please? i just tried it and it didnt work, and i dont see a PR that mentions twitter spaces |
thanks! the example i'm currently trying to do is
|
your code works just fine (I use v1.45.3 regularly, just tried it today), thanks again for it! |
Hello, when i try it i have an error... youtube-dl https://twitter.com/i/spaces/1lPKqmorjLdKb |
I have noticed that when ripping from a |
If anyone develops this feature I would like to request also adding support for their built-in transcription of the Space as well. Seems like they send the transcriptions via WebSockets to a |
If your spaces is NOT recorded and you end the event, it is still possible to get the recording media_key. Here is how to do that: Just click on your past Tweet and check your network access for a URL like this: This will expose a rest_id and media_key in the format of:
That key does NOT work in this URL format which works for actually recorded streams: https://api.twitter.com/1.1/live_video_stream/status/:media_key_here: Not sure if this helps anyone, just sharing notes. Also, fun fact if you replay that graphql request but you change all the =false to =true you get extra stuff. |
This comment was marked as duplicate.
This comment was marked as duplicate.
You've just reproduced the problem shown in the original issue. |
Sounds strange. Raise this with supporting logs at yt-dlp if reproducible. |
Checklist
Description
An example tweet with a Spaces link: https://twitter.com/akirosenthal/status/1397936847741800454
youtube-dl output:
Looking at the network tab in Chrome’s developer tools, it seems like the site’s making connections to pscp.tv, so possibly the already existing Periscope extractor could be used as a base to support Spaces URLs. An example playlist URL:
Example playlist content:
The last chunk in that playlist would refer to this URL:
The text was updated successfully, but these errors were encountered: