r/programming • • Oct 23 '20

[deleted by user]

[removed]

7.0k Upvotes

1.4k comments sorted by

View all comments

Show parent comment

112

u/Holobrine Oct 24 '20

Please tell me there is another place to find this code, because I only just learned of its existence and I would hate it if I'm already too late.

201

u/SpaceshipOperations Oct 24 '20 edited Oct 26 '20

You can download the latest release source code from PyPI:

https://pypi.org/project/youtube_dl/#files

The latest master branch snapshot is also downloadable from the Internet Wayback Machine:

https://web.archive.org/web/20201018144703/https://github.com/ytdl-org/youtube-dl

(Click on the green 'Code' drop down menu above the file list to the right side, and select 'Download Zip'.)

As a last resort (if the above two get taken down), if you have it installed, you can just make a backup copy of its currently installed files. Since it's a Python program, its installed files include the entire source code.

If you are on Linux, this can be pretty easy to do with the help of your package manager. First, look up the command to list files owned by a given package for your package manager (For example, on ArchLinux, it'd be pacman -Qlq youtube-dl), then you can back them up like this:

pacman -Qlq youtube-dl \
    | grep -v '/$' \
    | rsync -av --mkpath --files-from=- / youtube-dl

Which backs up all of the packages' files into a directory called youtube-dl in the current directory. (You will need to install rsync for this method if it's not already on your system.)

Edit: For Windows users, I took a look at the contents of the Windows .exe file (from the Wayback Machine repo), and it looks like its contents are all compiled files (with .pyo and .pyd extensions) - no source code.

If the source code becomes inaccessible from the above links, it may still be possible to obtain it from Linux distro repositories. A few quick links:

https://www.archlinux.org/packages/community/any/youtube-dl/ (Click "Download from mirror" to the right)

https://packages.debian.org/bullseye/youtube-dl (Download link is at the bottom; it's called "all" under the "Architecture" column. After clicking it, select one of the mirrors to download.)

https://packages.ubuntu.com/focal/youtube-dl (Same as Debian)

4

u/[deleted] Oct 24 '20

Unfortunately, as a longtime youtube-dl user I can say that the snapshots of this repo won't be very useful. Youtube is typically constantly implementing various countermeasures against youtube-dl, which the devs are in turn defeating in various ways. Now that the repo has been taken down, I fear it's just a matter of time until the code breaks.

→ More replies (1)

6

u/anta40 Oct 24 '20

Both latest source code and Windows binary works fine. Gratsie :)

3

u/rrzibot Oct 24 '20

I love the internet

→ More replies (7)

168

u/[deleted] Oct 24 '20 edited Oct 24 '20

FWIW, it'll likely be back up. This claim is obviously false; DMCA claims may only be made by the copyright holder or their agent, and I'd bet the farm that no code in this repo belonged to the RIAA or those they represent. The fact that someone could theoretically use it to download copyrighted content is meaningless, otherwise they could copyright strike torrent clients or even Chrome/Firefox/etc. (See also: https://old.reddit.com/r/programming/comments/jgub36/youtubedl_just_received_a_dmca_takedown_from_riaa/g9u6v4f/)

Also, just use JDownloader. Works perfectly for YouTube vids.

128

u/darkslide3000 Oct 24 '20

That's not what it's trying to say. Read the full letter.

Anticircumvention Violation. We also note that the provision or trafficking of the source code violates 17 USC §§1201(a)(2) and 1201(b)(1). The source code is a technology primarily designed or produced for the purpose of, and marketed for, circumventing a technological measure that effectively controls access to copyrighted sound recordings on YouTube, including copyrighted sound recordings owned by our members.

George W made sure that these assholes can sue anyone selling a hammer whenever a hammer was used to break open someone's window.

17

u/the_gnarts Oct 24 '20

We also note that the provision or trafficking of the source code violates 17 USC §§1201(a)(2) and 1201(b)(1). The source code is a technology primarily designed or produced for the purpose of, and marketed for, circumventing a technological measure that effectively controls access to copyrighted sound recordings on YouTube, including copyrighted sound recordings owned by our members.

If that were true, this would mean that a) ytdl is now capable of processing DRM’d streams (is it?) and b) this was its primary purpose. a) would be a great contribution to all of mankind but even if it were the case, claim b) remains just as absurd. ytdl was around before there even was a something like EME [0] so the claim it was designing primarily to “circumvent” it is completely baseless.

[0] The date on commit 4fa74b5.. is 2008.

14

u/darkslide3000 Oct 24 '20

a) ytdl is now capable of processing DRM’d streams (is it?)

Well... not really. In these sort of legal decisions they usually decide that any token effort to protect the stream "effectively controls access", even if it's ROT13 with a hardcoded key. Basically, rather than having to put real technical skill into the problem the MPAA just lobbied themselves a law that said they can fuck up their copy protection as badly as they want and just sue anyone who works around it.

11

u/codav Oct 24 '20

The takedown notice actually refers to YouTube's "rolling cipher" technology, which is as far as I could see from the web player, not an actual content encryption cipher but simply a time-limited key the player needs to refresh in regular intervals to access the CDN servers. So it's more like the good ol' CSS encryption on DVDs: not really something that stops anyone from accessing or decoding the content, but enough to pass the term "technological measure" in most copyright laws, enabling the content industry to DMCA the hell out of anyone reimplementing the key exchange on their own. YouTube added this new "measure" about three months ago, possibly due to pressure from the RIAA.

3

u/RedditIsNeat0 Oct 24 '20

The date on commit 4fa74b5.. is 2008.

I would like to add that the message of that commit is "Create initial preview version of the new youtube-dl". That suggests that there was an older version as well.

→ More replies (3)

11

u/zerocnc Oct 24 '20

Does this include standard libraries that come with every language? If so, this is a gold mine!

18

u/darkslide3000 Oct 24 '20

I mean... depends on how good your lawyer is, I think. If you ask me these laws are written pretty dumb with little technical understanding, so you can basically make them do whatever dumb shit that goes against any common sense you want as long as you can convince some judge who only knows how to use the internet when his interns print it out for him.

6

u/Rhowryn Oct 24 '20

Don't know if you're joking, so no, obviously not. The relevant section specifies applications of code specifically designed to circumvent copyright protections.

26

u/njantirice Oct 24 '20

it's not designed to circumvent copyright protections, it's designed to download videos off of youtube

→ More replies (24)

2

u/Mr2001 Oct 25 '20

George W made sure that these assholes can sue anyone selling a hammer whenever a hammer was used to break open someone's window.

Not George W., I'm afraid. The DMCA was signed into law by Bill Clinton on October 28, 1998.

→ More replies (16)

71

u/09f911029d7 Oct 24 '20 edited Oct 24 '20

The fact that someone could theoretically use it to download copyrighted content is meaningless, otherwise they could copyright strike torrent clients

Are you too young to remember when they shut down Napster, KaZaA, and LimeWire? They have and they won. Theoretically being able to use a piece of software to download copyrighted content is enough.

I think the only reason browsers get away with it is because normies know what a web browser is, and Google already has contracts with record agencies anyways

10

u/Anne_Roquelaure Oct 24 '20

As soon as everything has an app, they will come for the browsers

→ More replies (5)

2

u/bigjeff5 Oct 24 '20

You're flat wrong. Theoretically being able to use a piece of software to download copyrighted material is NOT enough. There are thousands of applications that fit that description that are not and never will be hit with a viable copyright lawsuit.

It has to be the PRIMARY use of the software, or at least one of the primary uses, and the creators have to be actively engaged in promoting usage that violates copyright law. Napster, Limewire, Kazaa, etc all advertised the free movies and music and software you could get in their platforms, which made them culpable.

Unfortunately, YouTube-dl is much the same as Napster et. al.: they actively promote violating copyright, so I can't see how they win this.

→ More replies (9)

2

u/KHRoN Oct 24 '20

it's not about downloading yt videos, jdownloader is not drop-in replacement of ytdl

2

u/jackmax9999 Oct 24 '20

JDownloader is huge and unwieldy (300 MB, over 6000 files), it always takes a while to start and update, and it cannot be scripted from Python like youtube-dl

→ More replies (5)

4

u/[deleted] Oct 24 '20

Streisand effect in action.

→ More replies (3)