manbearwiz/youtube-dl-server

Boorkmarklet produces "True"

gerroon opened this issue · 7 comments

Hi

I am trying to use the bookmarklet, but when I press on it when in a youtube page all I get is an empty screen that says "true" after clicking on it. I put the right server ip and the port.

I am usingn the python version, and I tested regular ui download and that works.

javascript:!function(){fetch("http://IP:PORTyoutube-dl/q",{body:new URLSearchParams({url:window.location.href,format:"bestvideo"}),method:"POST"})}();

Here is the response log when clicked

IP - - [04/Nov/2019 20:08:20] "GET /youtube-dl/q HTTP/1.1" 404 744

Here I get a similar error when I use the curl method

curl -X POST --data-urlencode "url=https://www.youtube.com/watch?v=v6XyFJLAIyM" http://IP:PORT/youtube-dl/q

curl -X POST --data-urlencode "url=https://www.youtube.com/watch?v=v6XyFJLAIyM" http://IP:PORT/youtube-dl/q

    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html>
        <head>
            <title>Error: 404 Not Found</title>
            <style type="text/css">
              html {background-color: #eee; font-family: sans;}
              body {background-color: #fff; border: 1px solid #ddd;
                    padding: 15px; margin: 15px;}
              pre {background-color: #eee; border: 1px solid #ddd; padding: 5px;}
            </style>
        </head>
        <body>
            <h1>Error: 404 Not Found</h1>
            <p>Sorry, the requested URL <tt>&#039;http://IP:PORT/youtube-dl/q&#039;</tt>
               caused an error:</p>
            <pre>Not found: &#039;/youtube-dl/q&#039;</pre>
        </body>
    </html>


Does the browser UI work for you?

Yes the wep app UI works

I am also wondering between now and then if youtube API has changed :( I just tried the web app and this is what I have in the terminal

WARNING: unable to download video info webpage: HTTP Error 429: Too Many Requests
WARNING: unable to download video info webpage: HTTP Error 429: Too Many Requests
WARNING: unable to download video info webpage: HTTP Error 429: Too Many Requests
WARNING: unable to download video info webpage: HTTP Error 429: Too Many Requests
ERROR: v6XyFJLAIyM: YouTube said: Unable to extract video data

Ok Here is web ui first then Curl, I have no idea.

[youtube] v6XyFJLAIyM: Downloading webpage
[youtube] v6XyFJLAIyM: Downloading video info webpage
WARNING: unable to download video info webpage: HTTP Error 429: Too Many Requests
WARNING: unable to download video info webpage: HTTP Error 429: Too Many Requests
WARNING: unable to download video info webpage: HTTP Error 429: Too Many Requests
WARNING: unable to download video info webpage: HTTP Error 429: Too Many Requests
ERROR: v6XyFJLAIyM: YouTube said: Unable to extract video data
IP - - [05/Nov/2019 01:32:46] "POST /youtube-dl/q HTTP/1.1" 404 744


I can watch in a regular browser, but same youtube url produces the errors above, so this is something to do with the downloader

It seems to be an API change. But the erro I originally reported could be not related to the youtube-dl breakage.

youtube-dl https://www.youtube.com/watch?v=6uhN97Cpz6I
[youtube] 6uhN97Cpz6I: Downloading webpage
[youtube] 6uhN97Cpz6I: Downloading video info webpage
WARNING: unable to download video info webpage: HTTP Error 429: Too Many Requests
WARNING: unable to download video info webpage: HTTP Error 429: Too Many Requests
WARNING: unable to download video info webpage: HTTP Error 429: Too Many Requests
WARNING: unable to download video info webpage: HTTP Error 429: Too Many Requests
ERROR: 6uhN97Cpz6I: YouTube said: Unable to extract video data

FWIW - I am pretty sure this is a CORS problem. Not sure though just how to resolve it.