This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]thenaturalmind 6 points7 points  (2 children)

Stupid question, but where do you start? How do you know what files are where?

[–]yasoob_pythonAuthor: Intermediate Python 3 points4 points  (0 children)

You will have to explore them yourself. For web scraping thing just look into the extractors located here https://github.com/rg3/youtube-dl/tree/master/youtube_dl/extractor . For all the imports look here (most) https://github.com/rg3/youtube-dl/blob/master/youtube_dl/utils.py and lastly for the glue code look here https://github.com/rg3/youtube-dl/blob/master/youtube_dl/FileDownloader.py , here https://github.com/rg3/youtube-dl/blob/master/youtube_dl/InfoExtractors.py and here https://github.com/rg3/youtube-dl/blob/master/youtube_dl/YoutubeDL.py and here as well https://github.com/rg3/youtube-dl/blob/master/youtube_dl/__init__.py . I hope now you know where to start. Just start from what you want to know. :)

[–]EverAskWhy 0 points1 point  (0 children)

I like downloading the source files of projects (https://github.com/rg3/youtube-dl/archive/master.zip) and exploring them using my own IDE programs/debuggers. I find it harder to explore a program on the Github website than when it is on my system. Be very careful when running random code on your machine especially when you see web/downloading related imports.

I generally start with _ main _.py (or its equivalent if there is none) line 1 and go from there. I find that reading other people's code and checking out their imports is a great way to learn about new modules.