Closed andrewprivate closed 5 years ago
I will add more and then PR this.
Reopened. Added better parsing (error handling + second format)
Hey Andrew,
These changes look good. Its always a struggle with these video providers since they use a lot of crappy JS to obfuscate links and theres no easy way to get around it without eval (risky) or a headless browser (expensive).
This looks like a good middleground. In future I would like to make a version that is capable of parsing a whole series of these free video hosts links, but that is probably a job for another library.
released
to series info (year of release)Vidstreaming stores video information in a JS script tag now.
For example:
Previously, with #29 , I used a lazy method of just getting the first string I encounter. However, this could lead to a video source with bad quality if multiple are available like above. To solve this, I implemented a simple JSON parser using some StackOverflow code found here
Now, it compares labels to get the video with the highest quality.
Here is an example:
This will be logged: