Specific path to Youtube_dl files in Centos

306 views Asked by At

The recent path to youtube_dl is "/usr/local/bin/youtube_dl". I want to edit some files in youtube_dl, but couldn't find the files to it.

Does it has any specific path or i have to unzip it?

1

There are 1 answers

6
AudioBubble On BEST ANSWER

If you want to change youtube-dl, the easiest way is to follow the develop instructions and use git to check out the repository, with the following commands:

git clone https://github.com/rg3/youtube-dl.git
cd youtube-dl
python -m youtube_dl

For more information, refer to the youtube-dl FAQ. Alternatively, you can also download the source release.


Now, if you really want to work from your /usr/local/bin/youtube-dl file, here's the secret: youtube-dl makes use of cPython's ability to execute a zip file. The file you downloaded is just a zip file with a short extra header. A good zip program should be able to extract it for you:

$ unzip youtube-dl
Archive:  youtube-dl
warning [youtube-dl]:  22 extra bytes at beginning or within zipfile
  (attempting to process anyway)
  inflating: youtube_dl/YoutubeDL.py
  ...
  inflating: __main__.py             

If your zip program doesn't support skipping bytes, you can use a hex editor to remove the 22 bytes before 50 4B 03 04, and then unzip it.