Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Support for Downloading HTTP Authentication Protected Podcast Feeds #20258
Comments
|
You must provide concrete examples with concrete reproducible credentials. |
|
Any way I could privately relay an example with credentials? |
Please follow the guide below
xinto all the boxes [ ] relevant to your issue (like this:[x])Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2019.03.01. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue
Description of your issue, suggested solution and other information
One of my favorite uses of youtube-dl is as an archiving solution. Recently I was attempting to archive some podcasts that were protected by HTTP Authentication (https://username:password@example.com/podcast/feed). I know that premium podcasts distribute their URLs in this format for supporters. Most podcast clients can parse this type of url.
I tried every combination of the
-u username -p passwordI could.Solution
You can get around this by inserting the Authorization header into youtube-dl's request.
The authorization header is formatted as "Authorization: Basic [username:password encoded with base64]"
Note that you have to encode your username:password beforehand.
username:password encoded with Base64 is dXNlcm5hbWU6cGFzc3dvcmQ=
So your authorization header will look like this
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=You can insert this header with the
--add-headercommandYour new youtube-dl command will look like this:
I was able to confirm that this works for me. Could this process be automated when "username:password@example.com" is detected in the URL?