GitHub nuked my clearly non-infringing patch to youtube-dl and the non-infringing GitHub issue. So here's a mirror:

To apply it you will need a copy of youtube-dl. You can find latest release (incl. source code) on yt-dl.org, its official website. In addition, the development versions and source code history is available:

The releases and git tags are signedarchive.org and you can find the two relevant keys on your favorite PGP key server.

For more context, see "Music industry forces widely used journalist tool offline" from the Freedom of the Press Foundation and The Github youtube-dl Takedown Isn't Just a Problem of American Law from the Electronic Frontier Foundation.