0

So I found out how to generate the URL of an mp3 download link of a Youtube video given its videoID with the help of this question: Youtube download link from http://www.youtube-mp3.org/

The generated media URL would be http://www.youtube-mp3.org/get?ab=128&video_id="+video_id+"&h="+info.h+"&r="+timeNow+"."+cc(video_id+timeNow)

But how do I access the header file, info.h? I've done a bit of C++, but I don't know how I would access it in Android.

Also, what does the "cc" mean?

Thank you.

Community
  • 1
  • 1
yoyoyo
  • 27
  • 7

1 Answers1

0

cc() is the function cited in your linked question. It's the code block just above the generated URL you cited.

about info.h: It's a variable. You'd need to study where the variable is set in the given script. It's not a header file and has nothing to do with C++.

As an alternative, you can also download the youtube webpage and then search the video's config (written in json). There is an url encoded paramater with the name "url_encoded_fmt_stream_map". Just decode it and find the streams with "type=audio". Usually you get an mp4 and vorbis option. This might be easier than using a forign service.

Benjamin Marwell
  • 1,173
  • 1
  • 13
  • 36
  • Thanks for the clarification on the cc. Still confused about info.h, though. Is this something I can access. How can I view this script? – yoyoyo Aug 14 '14 at 08:31
  • Go to that webpage and view the source, or use dev tools to find that javascript. Would it not be an option not to use the mp3 converter, but using an existing library like youtube-dl and then converting the output yourself, as I suggested? – Benjamin Marwell Aug 15 '14 at 07:05