Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boorkmarklet produces "True" #51

Open
gerroon opened this issue Nov 5, 2019 · 7 comments
Open

Boorkmarklet produces "True" #51

gerroon opened this issue Nov 5, 2019 · 7 comments

Comments

@gerroon
Copy link

gerroon commented Nov 5, 2019

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

@gerroon gerroon changed the title Boorkmarkleft produces "True" Boorkmarklet produces "True" Nov 5, 2019
@gerroon
Copy link
Author

gerroon commented Nov 5, 2019

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>


@manbearwiz
Copy link
Owner

Does the browser UI work for you?

@gerroon
Copy link
Author

gerroon commented Nov 5, 2019

Yes the wep app UI works

@gerroon
Copy link
Author

gerroon commented Nov 5, 2019

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

@gerroon
Copy link
Author

gerroon commented Nov 5, 2019

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


@gerroon
Copy link
Author

gerroon commented Nov 5, 2019

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

@ChrisWeiss
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants