9

I am trying to develop an app for myself, which will download the audio version of video playing in the Youtube App. I have figured out almost everything else, all I want is to get the URL of the video which is playing in the Youtube app.

So, the question can be divided into two parts :-

  1. Is it even possible to get the url of video without any special permission from youtube (no i don't want to copy and paste video everytime, rather love it to do via code). There are other apps which are doing similar things, like fairbuy app which automagically show you options on other eCommerce sites for the same product. So, it must be somehow tracking the product url from the parent app.

  2. Can Google, stop me to publishing my app on Play Store? as it downloads the audio version of the song. I searched but there are no youtube downloaders on Play Store.

Thanks in advance :)

2 Answers 2

2
+50

Answer to query 1:

Yes, it is possible to fetch the url of the video playing in the official YouTube app. You are trying to integrate your app with the YouTube app and there is a standard way of achieving it in android. You may get details of the technique here.

The concern at this point may be does YouTube app provides the url to be fetched from other apps. This requires the concept of content providers (here). One can integrate any app with another app but is restricted only to the data provided by the parent app. YouTube app allows one to fetch the metadata of the current playing video.

This is more related to android rather than YouTube API as you are trying to get information regarding the current state of the YouTube app.

Answer to query 2:

Yes, it will be illegal to develop such an app as per the terms and services of YouTube. That being said, you will not be permitted to publish your app to Google PlayStore. To quote the terms and services of YouTube:

"You shall not download any Content unless you see a “download” or similar link displayed by YouTube on the Service for that Content.You shall not copy, reproduce, make available online or electronically transmit, publish, adapt, distribute, transmit, broadcast, display, sell, license, or otherwise exploit any Content for any other purposes without the prior written consent of YouTube or the respective licensors of the Content. YouTube and its licensors reserve all rights not expressly granted in and to the Service and the Content."

You may read more about the terms and services of YouTube here.

Why would one still bother to develop such as app?

Though it would be illegal to earn financial benefit by such an app as it violates the terms and services of another app it depends on but still, it would be legal to develop such an app for personal use only. Upon quoting the terms and services again:

Content is provided to you AS IS. You may access Content for your information and personal use solely as intended through the provided functionality of the Service and as permitted under these Terms of Service. You shall not download any Content unless you see a “download” or similar link displayed by YouTube on the Service for that Content. You shall not copy, reproduce, make available online or electronically transmit, publish, adapt, distribute, transmit, broadcast, display, sell, license, or otherwise exploit any Content for any other purposes without the prior written consent of YouTube or the respective licensors of the Content. YouTube and its licensors reserve all rights not expressly granted in and to the Service and the Content.

The point of debate at this point might be: Is YouTube a service or content provider? One may argue on both sides.

8
  • I couldn't find any Content Provider by Youtube application that can give me the URL of the current video it is playing. Is there any?
    – cegprakash
    Oct 21, 2016 at 10:12
  • 1
    The code depends upon how you approach the problem at hand. Would your app work in the background always or it will be launched from the YouTube app?
    – Aditya C
    Oct 21, 2016 at 10:22
  • 1
    You need to use MediaStore (here) to fetch the uri and the content provider details are provided upon request just like access to Google+ API. Hope that would help.
    – Aditya C
    Oct 21, 2016 at 12:29
  • I need the URL as soon as the user clicks on the video and the video starts playing. I am able to get the user action and text contents in the page from accessibility permission. Just not the URL. Do you think I will be able to get the URL without accessibility permission? Youtube is not my application. It is Google's application. How can I use Content Provider here to get the URL? I have already tried Youtube Android Player API and it does not give me URL.
    – cegprakash
    Oct 21, 2016 at 20:39
  • 1
    This is how we do it. The difference here is that another app you have to integrate with has restrictions not controlled by you. This idea is possible to implement but I can help further if I could take a look at your code to understand where and why are you stuck. This is the custom way to do it unless the YouTube app restricts it.
    – Aditya C
    Nov 8, 2016 at 18:36
0

Not only will they ban this app from GooglePlay, but if you post it on the internet (or 3rd party android store) they may make a law suite against, as people at TubeNinja found out. Latly google has starting going after YT downloader and YT mp3 converters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.