[plugins.playtv] Fix for new stream data API#2388
[plugins.playtv] Fix for new stream data API#2388back-to merged 12 commits intostreamlink:masterfrom melmorabity:playtv_fix
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2388 +/- ##
==========================================
- Coverage 52.64% 52.31% -0.33%
==========================================
Files 238 238
Lines 14961 14962 +1
==========================================
- Hits 7876 7828 -48
- Misses 7085 7134 +49 |
Codecov Report
@@ Coverage Diff @@
## master #2388 +/- ##
==========================================
- Coverage 52.73% 52.52% -0.21%
==========================================
Files 243 245 +2
Lines 15160 15378 +218
==========================================
+ Hits 7994 8077 +83
- Misses 7166 7301 +135 |
|
Just to note that there probably need to be some changes for the windows installer too :) |
src/streamlink/plugins/playtv.py
Outdated
| @@ -1,15 +1,17 @@ | |||
| import re | |||
|
|
|||
| import jwt | |||
There was a problem hiding this comment.
should probably be optional and not forced for every user.
|
Is there a way to install all optional dependencies via pip instead of listing them explicitly? You currently have listed the plugin's optional dependency under a plugin-specific name in the Btw, the optional dependencies also don't get installed in the CI environments and the only reason why it's working is that the changes are not being tested at the moment. |
Maybe a single "generic" extras_require target (named "extras" or "optional" e.g.) may be appropriate for all plugins with optional deps, instead of the plugin's name.
I don't think so, unfortunately. There's nothing in setuptools doc about it. |
|
If you're not verifying the signature, and it's only for this website, probably you can just roll your own method to decode it? Update: this should do it def jwt_decode(token):
info, payload, sig = token.split(".")
data = base64.urlsafe_b64decode(payload + '=' * (-len(payload) % 4))
return json.loads(data) |
Sorry, I haven't seen your update before pushing my fixes. And I better like your implementation. Will use it instead |
|
Restarting travis build for Python 3.7, failure was due to network error |
This PR fixes the playtv plugin:
Stream data API now returns a JWT-encoded URL. As a result, JWT support for Streamlink is required. This PR also add a new dependency on the PyJWT library.
This PR also: