json powered youtube-dl #47

Closed
opened 2026-02-20 22:24:05 -05:00 by deekerman · 1 comment
Owner

Originally created by @Cightline on GitHub (Feb 7, 2011).

Advantages:
Faster, less code, more options and data via the API.

One way of implementing this would be to have youtube-dl preform a try/except statement and attempt to import json when it is updating. If it does not throw an exception, then it will update to the json version. Otherwise it will update to the json-less version.

Another way would be to include the json code into youtube-dl, but this will increase the size, and probably include more if/else statements. Although once it detects json, it will be able to use it as normal.

This could be the way to provide compatibility with Python 2.5 while enhancing/optimizing
2.6+

Originally created by @Cightline on GitHub (Feb 7, 2011). Advantages: Faster, less code, more options and data via the API. One way of implementing this would be to have youtube-dl preform a try/except statement and attempt to import json when it is updating. If it does not throw an exception, then it will update to the json version. Otherwise it will update to the json-less version. Another way would be to include the json code into youtube-dl, but this will increase the size, and probably include more if/else statements. Although once it detects json, it will be able to use it as normal. This could be the way to provide compatibility with Python 2.5 while enhancing/optimizing 2.6+
Author
Owner

@rg3 commented on GitHub (Feb 7, 2011):

Not interested for now. While the code can be a bit simpler, most time is spent downloading the videos themselves. JSON may be used in the future, but we won't maintain two versions of the same code, which is the only sane way to provide backwards compatibility.

@rg3 commented on GitHub (Feb 7, 2011): Not interested for now. While the code can be a bit simpler, most time is spent downloading the videos themselves. JSON may be used in the future, but we won't maintain two versions of the same code, which is the only sane way to provide backwards compatibility.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#47
No description provided.