get-url option not working #218

Closed
opened 2026-02-20 22:28:42 -05:00 by deekerman · 1 comment
Owner

Originally created by @cinpol on GitHub (Mar 4, 2012).

Option --get-url seems not to be working.

Example:
$ ./youtube-dl --get-url http://www.youtube.com/watch?v=OX36Vy5qfPU
http://v13.lscache3.c.youtube.com/videoplayback?sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cexpire&fexp=912209%2C909708%2C906503%2C910210&itag=22&ip=0.0.0.0&signature=965D1B8CC9A85EB9CAE01E594528CB881DA2C743.872EF0902BCDE2797505AB509899BB00158421F4&sver=3&ratebypass=yes&source=youtube&expire=1330933493&key=yt1&ipbits=0&cp=U0hSRVlOUV9OTUNOMl9RSFVFOmJ3S3hBcmNDMEFM&id=397dfa572e6a7cf5

When I try to open the link:
$ wget --spider "http://v13.lscache3.c.youtube.com/videoplayback?sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cexpire&fexp=912209%2C909708%2C906503%2C910210&itag=22&ip=0.0.0.0&signature=965D1B8CC9A85EB9CAE01E594528CB881DA2C743.872EF0902BCDE2797505AB509899BB00158421F4&sver=3&ratebypass=yes&source=youtube&expire=1330933493&key=yt1&ipbits=0&cp=U0hSRVlOUV9OTUNOMl9RSFVFOmJ3S3hBcmNDMEFM&id=397dfa572e6a7cf5"
Spider mode enabled. Check if remote file exists.
--2012-03-05 02:49:36-- http://v13.lscache3.c.youtube.com/videoplayback?sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cexpire&fexp=912209%2C909708%2C906503%2C910210&itag=22&ip=0.0.0.0&signature=965D1B8CC9A85EB9CAE01E594528CB881DA2C743.872EF0902BCDE2797505AB509899BB00158421F4&sver=3&ratebypass=yes&source=youtube&expire=1330933493&key=yt1&ipbits=0&cp=U0hSRVlOUV9OTUNOMl9RSFVFOmJ3S3hBcmNDMEFM&id=397dfa572e6a7cf5
Resolving v13.lscache3.c.youtube.com... 188.93.174.12, 2a00:1450:4001:1a::10
Connecting to v13.lscache3.c.youtube.com|188.93.174.12|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
Remote file does not exist -- broken link!!!

Originally created by @cinpol on GitHub (Mar 4, 2012). Option --get-url seems not to be working. Example: $ ./youtube-dl --get-url http://www.youtube.com/watch?v=OX36Vy5qfPU http://v13.lscache3.c.youtube.com/videoplayback?sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cexpire&fexp=912209%2C909708%2C906503%2C910210&itag=22&ip=0.0.0.0&signature=965D1B8CC9A85EB9CAE01E594528CB881DA2C743.872EF0902BCDE2797505AB509899BB00158421F4&sver=3&ratebypass=yes&source=youtube&expire=1330933493&key=yt1&ipbits=0&cp=U0hSRVlOUV9OTUNOMl9RSFVFOmJ3S3hBcmNDMEFM&id=397dfa572e6a7cf5 When I try to open the link: $ wget --spider "http://v13.lscache3.c.youtube.com/videoplayback?sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cexpire&fexp=912209%2C909708%2C906503%2C910210&itag=22&ip=0.0.0.0&signature=965D1B8CC9A85EB9CAE01E594528CB881DA2C743.872EF0902BCDE2797505AB509899BB00158421F4&sver=3&ratebypass=yes&source=youtube&expire=1330933493&key=yt1&ipbits=0&cp=U0hSRVlOUV9OTUNOMl9RSFVFOmJ3S3hBcmNDMEFM&id=397dfa572e6a7cf5" Spider mode enabled. Check if remote file exists. --2012-03-05 02:49:36-- http://v13.lscache3.c.youtube.com/videoplayback?sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cexpire&fexp=912209%2C909708%2C906503%2C910210&itag=22&ip=0.0.0.0&signature=965D1B8CC9A85EB9CAE01E594528CB881DA2C743.872EF0902BCDE2797505AB509899BB00158421F4&sver=3&ratebypass=yes&source=youtube&expire=1330933493&key=yt1&ipbits=0&cp=U0hSRVlOUV9OTUNOMl9RSFVFOmJ3S3hBcmNDMEFM&id=397dfa572e6a7cf5 Resolving v13.lscache3.c.youtube.com... 188.93.174.12, 2a00:1450:4001:1a::10 Connecting to v13.lscache3.c.youtube.com|188.93.174.12|:80... connected. HTTP request sent, awaiting response... 403 Forbidden Remote file does not exist -- broken link!!!
Author
Owner

@phihag commented on GitHub (Mar 4, 2012):

As you can see from the error message 403 Forbidden, the link is correct, and the file does exist, but you are not allowed to download it.

That is because youtube expects the request to come from the same IP that executed youtube-dl, and come with the same cookies. Use the --cookies option to write the cookies into a cookie jar file, and use wget's --load-cookies option to load the cookies from that file.

@phihag commented on GitHub (Mar 4, 2012): As you can see from the error message `403 Forbidden`, the link is correct, and the file does exist, but you are not allowed to download it. That is because youtube expects the request to come from the same IP that executed youtube-dl, **and** come with the same cookies. Use the `--cookies` option to write the cookies into a cookie jar file, and use wget's `--load-cookies` option to load the cookies from that file.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#218
No description provided.