Comments (15)
I was wondering if this could be done without the API and it does appear to be possible and even relatively simple as well.
Youtube embeds a JSON object into the source of the playlist page which is then processed by polymer (the JS frontend) in order to show content.
Here is a gist from the information from the following page: https://www.youtube.com/user/LinusTechTips/playlists
https://gist.github.com/Zyano/857e5a4ad8df73e41b63aad6a71277b5
The section in the gist is layered in the HTML like this.
<script > window["ytInitialData"] = JSON SNIPPET/GIST GOES HERE window["ytInitialPlayerResponse"] = (null); if (window.ytcsi) {window.ytcsi.tick("pdr", null, '');} </script>
It should be possible to parse this information to get the desired result.
from youtubeexplode.
We'll see, if I be in need of implementation for this, I will :)
from youtubeexplode.
I will go ahead and clean it up and submit a PR then we can have an easier discussion about the changes to see if it's the right fit.
from youtubeexplode.
Doesn't look like there's a way to get around parsing HTML :/
from youtubeexplode.
I'm thinking maybe we should define a stricter scope of what YoutubeExplode should or shouldn't do. I'm not sure if I want it to turn into an alternative to Google API without the API key.
from youtubeexplode.
Well, I can't really decide that, you do what you think is best, I could always write Extensions lib to do this parsing if I really need :)
from youtubeexplode.
In that case, maybe you want to make it into a pull request? 😛
from youtubeexplode.
Any news or developments on this? This would be a neat thing to have.
As for your query a year ago @Tyrrrz, I might as well comment on that.
I personally view YoutubeExplode as one of the better alternatives to the YouTube API, and I feel it'd be nice for it to expand a bit more. If it can be scraped in a reliable way, we should be able to access it.
Just my two cents worth :)
from youtubeexplode.
I don't have any stake in this, so I'm not planning to implement this myself. 😛
If somebody has a working solution, please raise a PR.
from youtubeexplode.
Gist for pulling all of the playlists from ytInitialPlayerResponse
bit slow and horrible but it does the job. Doesn't get all playlists as I have not implemented pagination
https://gist.github.com/Themodem/a73bf110a4213f273b44434eb721cae4
from youtubeexplode.
@Tyrrrz Is this feature something you wish YoutubeExplode to support? I'm currently making this feature for myself since the changes to the amount of API requests youtube allow and was wondering if this has any interest.
There are a few gotchas around my current implementation which relies on AngleSharp and AngleSharp.Io which in turn conflicts with the .net45 and netstandard1.1 support.
I'm aware the issue has been "dead" for a while
from youtubeexplode.
Hi @Zyano
First of all, thank you for your interest. 🙂
Personally, I have no stake in this feature and it doesn't seem that a lot of people need it (although I may be wrong).
The only reason I'm "careful" about adding new functionality is that I later have to support it when YouTube inevitably changes something.
That said, if the implementation is reasonably simple, it may be nice to have it in.
from youtubeexplode.
For those that didn't read the conversation in the PR. It was decided that the feature requires too many changes in order to be supported.
@Tyrrrz
I guess the question remaining is "should this enhancement be closed or updated in some way"
from youtubeexplode.
Yeah it turned out a bit too big than I had hoped. I thought it would be around the size of @Themodem's solution.
I'm leaning towards descoping this personally but open for opinion.
from youtubeexplode.
Descoping to avoid maintenance creep.
from youtubeexplode.
Related Issues (20)
- Cannot get stream manifest of a video that is still being processed HOT 8
- Search feature crashes on mobile devices HOT 1
- Audio files are downloaded as WebM, Mp3 does not work HOT 3
- Using a live video URL throws an exception
- 403 (Forbidden) HOT 1
- Occasionally streams just dies HOT 13
- Streams are sometimes unstable
- Exception "Could not extract video upload date" with specific video
- GetVideosAsync does not return all videos of a playlist
- GetManifestAsync silent crash on Android HOT 9
- YoutubeExplode failed to fetch video HOT 1
- Closed captions that erroneously contain valid SRT segments within them break when processing with FFmpeg HOT 1
- Closed captions that contain invalid offsets and/or durations break when processing with FFmpeg
- Some streams can return 404 HOT 4
- Getting `System.Net.CookieException` on some requests HOT 6
- Invalid Youtube Video ID or URL error
- Searching fails when encountering pay-to-watch videos HOT 4
- Video downloads, but only audio, no video HOT 30
- Download private video by passing list of cookies, bit got 401
- 500 error when calling GetManifestAsync HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from youtubeexplode.