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.
Add the option to return only the info_dict #296
Comments
|
It might be clearer to separate the info extracting and the passing to the downloader. So for example real_extract returns the info dict and extract passes it to the downloader. |
|
after studying the code a bit i came to the same conclusion! |
|
Actually the docstring for |
|
Hmm, the current implementation is insane, particularly for the randomly positioned |
|
All the InfoExtractors now returns an info_dict. |
When _real_extract() is called, it immediately sends the parsed info to it's FileDownloader.
To expand the usability of youtube_dl, it would be great if the caller could only retrieve the parsed video info and do whatever he pleases with it.
A quick look at the code shows that this could be done by adding a, for example, "data_only" argument to InfoExtractor.extract(),
which is a bool indicating if we should download, or only parse the info. This is then passed to _real_extract().
See this example for init.py, line 1450-1467. It assumes _real_extract() got the "data only" argument.