Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3637

how to download youtube video with javascript

$
0
0

Actually I am making a website to download video from youtube and I am using an api. The problem is that when I open the website to download the video it doesn't work but when I take the url in the code and remove an apostrophe in that (https://loader.to/api/button/?url= when I remove the first apostrophe in my browser search bar you shall see in the javascript code) and add the youtube video link it works but when it is in my code it don't works

here is the code

$(".btn").click(function() {    var link = $(".link").val();    var format = $(".format").children("option:selected").val();    var src = ""+ link +"="+ format +"";    download(link, format);});function download(Link, format) {    // here is the looder API    $('.button-container').html('<iframe style="height:50px; border:none; overflow:hidden;"src="https://loader.to/api/button/?url='+ link +'&f='+ format +'"></iframe>');}
section.button-container {    display: flex;    flex-direction: column;    margin-bottom: 30px;    width: 500px;}section .button-container button {    height: 50px;    border-radius: 5px;    font-size: 20px;    border: none;    color: #fff;    background-color: #2af598;    letter-spacing: 1px;    cursor: pointer;}
<section><div class="button-container"><button class="btn" type="submit">start</button></div>     </section>

Viewing all articles
Browse latest Browse all 3637

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>