Had this question in my mind for a while now, after going through the recent Reddit API drama.

I am a big FOSS advocate, and have moved away from YouTube (but not the contents, lol) because of its invasive tracking practice.

I have been using NewPipe on my phone for a long time now, and I think it’s an excellent piece of work.

I believe I also read somewhere that unlike other third party YouTube Apps, NewPipe doesn’t use YouTube’s API, but instead retrieves data by scraping the website via an Extractor.

Recently I came across LibreTube - which I believe has a slightly different approach. It points to a “Piped API” which acts as an “intermediary” between YouTube and LibreTube ( and I think I also heard that Piped API uses NewPipe Extractor underneath) - I am not hugely tech-savvy, so correct me if I sound weird.

All these said and done - in case YouTube decides to turn rogue one fine morning (like Reddit) - will any of these Apps be impacted?

(And while we are here, can anybody please ELI5 for me the differences between Invidious and Piped?)

Thanks in advance !

  • @Zikeji@programming.dev
    link
    fedilink
    English
    42
    edit-2
    1 year ago

    In the development industry, the concept of an API (application programming interface) is to give developers a way to interface with the backend". When we’re referring to an API, like the Reddit API, a majority of the time we’re referring to a public API - which are typically versioned, documented, and have specific rules or conditions unique to them.

    When a website or service doesn’t have a public API, or that public API doesn’t suit the needs or is otherwise not applicable, we will often turn to scraping. Scraping can be done a number of ways, and I won’t go into those details. But the short of it is that we’re usually mapping data into a usable format, and acquiring it by interfacing with the website as though we’re a normal user.

    One of the drawbacks of scraping is that normal changes, even small, can break the logic we have scraping that website. This is also the case with projects like NewPipe, Piped, and LibreTube.

    LibreTube, NewPipe, and Piped all use NewPipe’s Extractor underneath the hood. Invidious appears to have it’s own logic. The “Piped API” uses NewPipe Extractor, which is a Java library, and essentially converts it into a web API that other projects that aren’t Java can utilize.

    Sharing that logic is actually beneficial, if YouTube changes something that breaks all the open source frontends, developers from all 3 projects (and as it is OSS, unaffiliated ones as well) can identify what change is breaking the extractor and fix it, pushing out an update fixing their frontend rapidly. I’m not sure how it works in practice as I don’t follow the project, so I’m just assuming that Invidious gets fixed slightly slower than the other three.

    But back to your original question, YouTube can’t “turn rogue” in the same way Reddit did, in a sense YouTube is already rogue. The developers of third party apps on Reddit utilize a public API with permission, and follow a certain set of guidelines and other requirements. Developers making alternate frontends for YouTube do not utilize any APIs with permission, and just the act of using one of those frontends is likely a terms of service violation on YouTube (not that it matters).

    The reason we don’t see the open source YouTube frontends breaking all the time is likely due to effort. YouTube could completely change one of it’s APIs it uses, but then they would have to update all of it’s software that relies on it. Their website, the Android app, the iOS app, probably the YouTube music apps, and not to mention every smart TV app. And this change would likely be identified and fixed by the OSS developers within days, if not hours. So YouTube can’t really actively combat it on the development end, and would need to take the legal route. Publishing code for scraping isn’t illegal (but they could, and have, use intimidation), so YouTube’s legal recourse would be to get stuff using the code shutdown. Right now the user base for the frontends is probably small enough that they’re tolerating it.

    TL;DR: YouTube is already rogue, scrapiing bypasses that. Changes to YouTube already break open source frontends but are resolved rapidly by developers.

    As for answering the followup question: “can Reddit developers do the same thing”. Yes. Will they? Maybe, maybe not. Reddit had a great API which encouraged third party growth, now that Reddit has made that API prohibitively expensive, it’s not really an option. Developers inthe past could utilize that API and monetize their projects (so long as it fit within guidelines, if any). Turning to scraping / “unsupported” methods of interfacing with the website means they realistically can’t monetize their work as doing so puts them in legal hot water. They also would have trouble publishing their app (if it’s an app) on platforms like Play Store and the App Store. And face intimidation and legal threats.

    • @rufus@discuss.tchncs.de
      link
      fedilink
      English
      61 year ago

      This is kind of besides the question, but a reddit alternative also is on a completely different level than developing an alternative for youtube. it is way easier to replace. You mainly need the userbase.

      With youtube, it’s more complicated. Hosting videos takes vast amounts of storage. And it is pretty commercialized. People want to make money with their content. Which opens another can of worms. You need advertisements, tracking, payments … Legal stuff becomes much more important when handling money etc.

    • DeadNinjaOP
      link
      fedilink
      English
      51 year ago

      You have absolutely no idea what a gem of a comment you wrote ! This clears up a lot of things for me. Thanks !

      I also read that the original Invidious Dev (Omar Roth) has shut down his instance in 2020, and is also taking a break from active development. Other Invidious instances might still be around, but for now it’s not the most interesting thing to check out, at least for me.

      • @Zikeji@programming.dev
        link
        fedilink
        English
        31 year ago

        I also read that the original Invidious Dev (Omar Roth) has shut down his instance in 2020, and is also taking a break from active development. Other Invidious instances might still be around, but for now it’s not the most interesting thing to check out, at least for me.

        The project itself is under active development, with plenty of active instances. I personally don’t use it but I don’t blame the original dev for shutting down their own instance, as hosting a project is a completely different beast from developing it.

    • @tryinghappy
      link
      English
      31 year ago

      Great comment! I’m keeping fingers crossed that a reddit app using scraping will show up for when I need to use it.

      • @Zikeji@programming.dev
        link
        fedilink
        English
        31 year ago

        There are a few privacy focused frontends for reddit like teddit and libreddit. They exist to fill a similar niche as NewPipe & Invidious - to reduce the amount of data being collected. However, they don’t fill the Sync / Apollo niche.

        I don’t think we’ll see apps like Sync or Apollo using the API unofficially anytime soon, with the hostility Reddit has shown. Then again, all it takes is one motivated developer lol.