-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
plugins.twitcasting: add support for private/password-protected streams #3505
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
Conversation
Don't worry about the linting too much (the extra commits will be squashed), but just in case you didn't know, you can install the dev-requirements and then run flake8 locally to get it right on your initial PR: https://streamlink.github.io/developing.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just reviewing the code changes, not the actual password implementation because I don't want to create an account and create a stream for this site.
This is my first ever pull request, in a language I have essentially no experience with. I hope everything is OK.
No problem. If you need help, just ask.
- remove redundant prefix - read the password argument only once - rename hash variable to more accurate name - use update_qsd to update the URL's query string
Thanks for the review! I've committed the changes you suggested and made sure that the option still works. No problem with it on my end. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes are looking good now. As said, this is just a code review and I can't tell whether this is the correct implementation, because I didn't validate it.
As a potential improvement, if the site returns an error response for wrong passwords, this could be caught here and handled with a respective error message. Tests for the newly added plugin argument are not really needed, as the plugin's stream URL resolving logic isn't tested anyway.
To the one who merges this, please make sure that no @-mentions are included in the squashed commit message body, thanks.
Description
Add a
--twitcasting-password
option to the TwitCasting plugin, supporting private (password-protected) TwitCasting streams.closes #3504
How it works
If the command line option is used, then we append
&word={md5_encrypted_password}
toreal_stream_url
.How to test
You can easily start a livestream from Twitcasting by hovering the blue "Broadcast" button at the top right of the site then clicking "Web broadcasting". Scroll down to set a password then back up to start an audio-only livestream. If you do not have an account, you can quickly login with a Twitter or Facebook account if you have one.
This is my first ever pull request, in a language I have essentially no experience with. I hope everything is OK.