-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
plugins.vaughnlive: fix to fit site changes. #2505
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
Codecov Report
@@ Coverage Diff @@
## master #2505 +/- ##
==========================================
- Coverage 52.59% 52.52% -0.07%
==========================================
Files 239 239
Lines 15073 15121 +48
==========================================
+ Hits 7927 7942 +15
- Misses 7146 7179 +33 |
|
Why is esprima being added here? We don't add additional dependencies like this without some sort of discussion and you've already been informed this is not acceptable. The decision regarding any sort of javascript parser has not been made by the maintainers or contributors. If you want to start a discussion on it feel free to do so, but this PR can't be merged with this change. This PR is in relation to this comment: #2178 (comment) and they claim it is simply a URL change. |
gravyboat
left a comment
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.
Commented above.
|
This is surprise. What do You mean? I thought there was discussion containing some pros and contra. If You think it is not enough You can add more arguments letting it continue. Finally You can make decision either accept or deny and close the issue like You did with foxnews plugin when You wanted to stop discussion. By the way, there was question asked about esprima but it got no answer. As for "it is simply a URL change" - it is not quite true to say the least. There are some more. And some changes happened right when I was writing the code. Worse of that the site code is slightly differ for domains. And these are all more causes to use parser. |
|
@vstavrinov, you assume that the full python support is available on all devices, but unfortunately that is not the case and one depends on the manufacturer of the devices / firmware and the hardware limitations. |
|
@Billy2011 give me example of the device where streamlink is running without problem, while esprima causes the problem and what that problem is. |
|
@vstavrinov I tried it and it won't play any stream. |
|
@mmetak Yes, I know. The site code has changed again after I committed this pull request. As I mentioned earlier this is already second time the changes happens while I am working on this plugin. But this time the things get worse, because secret key is not exposed now and should be calculated in some way. This key generated by javascript in browser and this functionality should be re-implemented in external environment with python. Recently I have solved similar task when was working here on foxnews plugin that was rejected, so I hope on success in this case too. |
|
|
|
I have to agree with @gravyboat. I don't see any merits of using a JS parser here and it's just unnecessary bloat which causes packaging problems for Streamlink. After taking a quick look at the changes of the pull request, it looks like you are using the generated AST of the JS parser to find a certain variable declaration in the utter mess of the vaughnlive JS code. This could also be done with a regex, although not as nicely as with an AST, but it should still work. If they would change the name of the variable you're searching for in the future, then both methods will fail, so using a JS parser is not a solid solution for implementing this. |
|
|
I think that having a JS parser would actually be quite useful for several plugin, where, as @vstavrinov pointed out, regex is clunky. Which package is most useful and if that package is feasible to add is another thing. @vstavrinov |
My quick lookup makes me think that esprima is most widely used "classic" tool originally written in js, used under nodejs and then ported to python. May be I am wrong, but I satisfied with my short experience with it. Fill free to probe somewhat other if it will better.
I have referenced postinst script as example only of possible solution. If You wish You can use preinst or even Makefile. You can do this at any stage of installing or packaging. Every package management system has their own means to solve such standard tasks. Eventually You can create separate package for it. Whatever way You choose in any case there are no problems as long as the package available in pip, or even without it this task looks relatively simpler in comparable with big complex compiled software with lot of library dependencies. |
|
@vstavrinov I fully accept that it is possible, and each distro will have their own packaging guidelines and requirements - eg. I imagine Debian would reject any package that used The comments by @mmetak and @Billy2011, should not be taken lightly as they both fall in to the category of package maintainer and their contributions are important to the Streamlink community. We should strive to make Streamlink better for everyone, and losing support for a distro's package would not make it better. Of course, I don't want to discourage you from continuing the contribute, as losing a contributor would be equally bad for the project. But, we all have to work together - we are a team, and the plight of your fellow teammates should not be overlooked :) I'm not saying it's impossible to add a dependency, I have personally added a couple of dependencies and probably caused @mmetak some headache... Given the size of the project now I would not add another without serious consideration and discussion. I would like to propose that create a guideline for adding a dependency to the project which should outline the possible issues, packaging requirements, licenses requirements, and request a short explanation of why we should add that package and how the benefits outweigh the costs. If we have a clearly thought out and well written argument for adding a dependency, we can better review its impact and consider it for inclusion. I think it's clear that it will be a fairly lengthly process to add a a new dependency, so with that in mind, is there another way to resolve the vaughnlive issue using existing tools? :) |
|
|
Hi everyone. As far as I'm concerned it's not a problem at all to add How about adding I maintain |
|
Seems like @vstavrinov As for getting the new dependency added, could you create a separate PR just adding the dependency so we don't have plugin issues mixed in with dependency issues. If you could also add some utility functions that make use of Where it takes a JavaScript object and tries to fix it to make it parsable as regular JSON. eg. This sort of function would be useful in a lot of plugins, a function that takes the JavaScript and turns it in to a |
|
closing, currently not possible with this solution. |
Plugin is broken at this time.