Giter Site home page Giter Site logo

Comments (15)

Zyano avatar Zyano commented on May 9, 2024 5

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.

SlowLogicBoy avatar SlowLogicBoy commented on May 9, 2024 1

We'll see, if I be in need of implementation for this, I will :)

from youtubeexplode.

Zyano avatar Zyano commented on May 9, 2024 1

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.

Tyrrrz avatar Tyrrrz commented on May 9, 2024

Doesn't look like there's a way to get around parsing HTML :/

from youtubeexplode.

Tyrrrz avatar Tyrrrz commented on May 9, 2024

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.

SlowLogicBoy avatar SlowLogicBoy commented on May 9, 2024

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.

Tyrrrz avatar Tyrrrz commented on May 9, 2024

In that case, maybe you want to make it into a pull request? 😛

from youtubeexplode.

Giggitybyte avatar Giggitybyte commented on May 9, 2024

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.

Tyrrrz avatar Tyrrrz commented on May 9, 2024

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.

Themodem avatar Themodem commented on May 9, 2024

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.

Zyano avatar Zyano commented on May 9, 2024

@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.

Tyrrrz avatar Tyrrrz commented on May 9, 2024

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.

Zyano avatar Zyano commented on May 9, 2024

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.

Tyrrrz avatar Tyrrrz commented on May 9, 2024

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.

Tyrrrz avatar Tyrrrz commented on May 9, 2024

Descoping to avoid maintenance creep.

from youtubeexplode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.