How to use youtube-mp3.org api?

I searched youtube for mp3 api and found this code:

var __AM=65521; // the largest prime less than 2^16... function cc(a){ var c = 1, b = 0, d, e; for(e = 0; e < a.length; e++){ d = a.charCodeAt(e); c = (c+d)%__AM; b = (b+c)%__AM; } return b<<16|c; } // The generated media URL is : "http://www.youtube-mp3.org/get?ab=128&video_id="+video_id+"&h="+info.h+"&r="+timeNow+"."+cc(video_id+timeNow) // with var timeNow = Date.now().toString(); 

I think that now it makes no sense, but this is the new youtube-mp3.orgs API, I think http://www.youtube-mp3.org/get?video_id=KMU0tzLwhbE&ts_create=1465936462&r=MTEyLjE5OC4xMTguMTcy&h2=0cee970ed707d270de70de7de7de can i apply it?

I also want to use this, but I do not know how to use and cannot understand the language.

https://github.com/victorsa/youtubetomp3

How can I call a function? sample with explanation will be more acceptable

0
source share
1 answer

This is PHP.

Just call

 YoutubeToMP3::get('http://www.youtube.com/watch?v=B2m_WnXjqnM', YoutubeToMP3::LINK); 

if you want to get a download link or

 YoutubeToMP3::get('http://www.youtube.com/watch?v=B2m_WnXjqnM', YoutubeToMP3::DOWNLOAD); 

if you want to download it directly.

+1
source

Source: https://habr.com/ru/post/1434351/


All Articles