Defaulting to HTTPS on YouTube #4810

Closed
opened 2026-02-21 00:25:15 -05:00 by deekerman · 3 comments
Owner

Originally created by @mmcco on GitHub (May 28, 2015).

This is a minor issue, but when you supply a YouTube link without an http:// or https:// prefix, the first output line is:

WARNING: The url doesn't specify the protocol, trying with http

Because HTTPS is default and expected on YouTube these days, it would be nice if youtube-dl defaulted to it.

It seems that a condition or a call to a helper function here is all we would need.

Thanks for your time.

Originally created by @mmcco on GitHub (May 28, 2015). This is a minor issue, but when you supply a YouTube link without an `http://` or `https://` prefix, the first output line is: ``` WARNING: The url doesn't specify the protocol, trying with http ``` Because HTTPS is default and expected on YouTube these days, it would be nice if youtube-dl defaulted to it. It seems that a condition or a call to a helper function [here](https://github.com/rg3/youtube-dl/blob/25c3a7348f7971c0af32dcea2d7fd57bd5c63f05/youtube_dl/extractor/generic.py#L868) is all we would need. Thanks for your time.
Author
Owner

@dstftw commented on GitHub (May 28, 2015):

youtube-dl supports not only YouTube, some of which are only accessible by http.

@dstftw commented on GitHub (May 28, 2015): youtube-dl supports [not only YouTube](https://rg3.github.io/youtube-dl/supportedsites.html), some of which are only accessible by http.
Author
Owner

@mmcco commented on GitHub (May 28, 2015):

I'm aware of that. It would be extremely simple to check the URL against a list of domains known to support HTTPS, though. That's what I was suggesting.

@mmcco commented on GitHub (May 28, 2015): I'm aware of that. It would be extremely simple to check the URL against a list of domains known to support HTTPS, though. That's what I was suggesting.
Author
Owner

@jaimeMF commented on GitHub (May 28, 2015):

Note that in the case of YouTube videos the extractor matches http:// urls and it will do all the requests with htttps://, so it won't use any insecure connection.

@jaimeMF commented on GitHub (May 28, 2015): Note that in the case of YouTube videos the extractor [matches http:// urls](https://github.com/rg3/youtube-dl/blob/04b3b3df05a26a361441754afeb7ff24d0c1f559/youtube_dl/extractor/youtube.py#L195) and it [will do all the requests with htttps://](https://github.com/rg3/youtube-dl/blob/04b3b3df05a26a361441754afeb7ff24d0c1f559/youtube_dl/extractor/youtube.py#L833-L841), so it won't use any insecure connection.
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#4810
No description provided.