-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
plugins.pluto: new plugin for https://pluto.tv/ #3363
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
https://pluto.tv/live-tv/ - Livestreams will break during commercials, without the `self.session.set_option('ffmpeg-fout', 'mpegts')` option enabled. - VODs might work without it, but I did not test it. closes streamlink#854 closes streamlink#2747 closes streamlink#3156 Co-authored-by: calculon-jr <54852718+calculon-jr@users.noreply.github.com>
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 some minor code suggestions. Tested all three URL types and they seem to work well.
src/streamlink/plugins/pluto.py
Outdated
return self.title | ||
|
||
def _schema_media(self, slug): | ||
return validate.Schema(validate.all( |
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.
validate.Schema
is already a wrapper for validate.all
.
src/streamlink/plugins/pluto.py
Outdated
'name': validate.text, | ||
'slug': validate.text, |
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 use str
instead of validate.text
src/streamlink/plugins/pluto.py
Outdated
|
||
|
||
class Pluto(Plugin): | ||
_re_url = re.compile(r'''(?x)^https?://(?:www\.)?pluto\.tv/(?: |
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.
For readability reasons, it's better to set the re.VERBOSE
option in the re.compile
call itself instead of the regex string.
src/streamlink/plugins/pluto.py
Outdated
return | ||
|
||
self.title = data.get('name') | ||
stream_link_no_sid = data['stitched']['urls'][0]['url'] |
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.
The stitched
attribute gets validated as optional in the schema above. If it's missing in the response, this statement will raise a KeyError.
When trying to run streamlink with a live-tv link, regardless of the channel (slug_live) given it defaults to newsy (this incidentally has no stitched and fails, but regardless the main issue is it seems the given slug is not being processed properly somewhere).
|
@WayoshiM run with |
@gravyboat I installed with pip with the latest .git version.
I think the issue might be that |
Correct newsy doesn't have stitched. so isStitched is false
|
https://pluto.tv/live-tv/ - Livestreams will break during commercials, without the `self.session.set_option('ffmpeg-fout', 'mpegts')` option enabled. - VODs might work without it, but I did not test it. closes streamlink#854 closes streamlink#2747 closes streamlink#3156 Co-authored-by: calculon-jr <54852718+calculon-jr@users.noreply.github.com> streamlink#3363 added to plugin matrix added test
https://pluto.tv/live-tv/ - Livestreams will break during commercials, without the `self.session.set_option('ffmpeg-fout', 'mpegts')` option enabled. - VODs might work without it, but I did not test it. closes streamlink#854 closes streamlink#2747 closes streamlink#3156 Co-authored-by: calculon-jr <54852718+calculon-jr@users.noreply.github.com> streamlink#3363 added to plugin matrix added test
https://pluto.tv/live-tv/ - Livestreams will break during commercials, without the `self.session.set_option('ffmpeg-fout', 'mpegts')` option enabled. - VODs might work without it, but I did not test it. closes streamlink#854 closes streamlink#2747 closes streamlink#3156 Co-authored-by: calculon-jr <54852718+calculon-jr@users.noreply.github.com> streamlink#3363 added to plugin matrix added test
Would be nice with support for closed captions/subtitles in this plugin. |
https://pluto.tv/live-tv/
self.session.set_option('ffmpeg-fout', 'mpegts')
option enabled.closes #854
closes #2747
closes #3156
Co-authored-by: calculon-jr 54852718+calculon-jr@users.noreply.github.com