I would like to know if I can make an ajax request to this web page to download videos from youtube, I do not get it, in theory this would be enough to download the file no?
$(()=>{
const api = 'http://youtubedl.xyz/download'
const request = new XMLHttpRequest()
request.open('POST', api, true)
request.setRequestHeader("Content-type", "application/x-www-form-urlencoded")
request.send('url=https://www.youtube.com/watch?v=O09KF_abpdE')
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>