Skip to content
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

Add support for YouTube member only live stream. #21

Closed
MinkiNTN opened this issue Nov 1, 2020 · 5 comments
Closed

Add support for YouTube member only live stream. #21

MinkiNTN opened this issue Nov 1, 2020 · 5 comments

Comments

@MinkiNTN
Copy link

MinkiNTN commented Nov 1, 2020

I noticed when trying to download chat replay from a YouTube "member only" live stream, the program returns Video does not have a chat replay., which is not true. Is it possible to add support so that chat replay can be downloaded from these streams by passing in a suitable cookie?

@xenova
Copy link
Owner

xenova commented Nov 1, 2020

This is a great idea! 👍 I unfortunately don't have any videos to test on (since I am not a member of any channel). Could I perhaps let you test the code before I add these changes to the master branch? The relevant lines of code are 116-129.
chat_replay_downloader.zip

You should be able to pass a cookies.txt file with -cookies <file>. For example:
python chat_replay_downloader.py <url> -cookies cookies.txt

Let me know if that works! 😃

@MinkiNTN
Copy link
Author

MinkiNTN commented Nov 1, 2020

I just tested and it works prefectly 👍

Another question that I think is kinda related (since I'm not that good with Python :D): I'm importing your script like this from chat_replay_downloader import get_youtube_messages, how would I insert the cookies to that because I think it happens before.

@xenova
Copy link
Owner

xenova commented Nov 1, 2020

Okay great! 👍

Oh right, I should explicitly mention how to import from the main module in the README. You can do so as follows:

from chat_replay_downloader import ChatReplayDownloader

session = ChatReplayDownloader(cookies='cookies.txt')
youtube_messages = session.get_youtube_messages('id')
# or
messages = session.get_chat_replay('url')

@MinkiNTN
Copy link
Author

MinkiNTN commented Nov 1, 2020

Awesome! Thanks again for the great work 👍

I don't know if I should close the issue so I'm gonna leave you to it.

@xenova
Copy link
Owner

xenova commented Nov 1, 2020

I'll close it with the next update! 😃

@xenova xenova closed this as completed in a83762f Nov 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants