Enhance video_downloader.py with Multithreading and Resume from previous .log file
#91
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
1 Introduce Multithreading to
video_downloader.pyThis update introduces multithreading to video_downloader.py to significantly improve the efficiency of bulk video downloads. Instead of processing each video sequentially, the script now utilizes Python’s ThreadPoolExecutor to handle multiple downloads concurrently.
Key changes include:
process_video()function to delegate YouTube and non-YouTube downloads appropriately.2 Add Resume Capability and Skip Counter to
video_downloader.pyThis enhancement introduces a resume feature to the multithreaded video downloader, allowing interrupted downloads to continue from where they left off without restarting the entire process.
Key updates include:
get_skip_counter()— Reads the log file to identify the last successfully downloaded video_id and determines how many entries to skip upon resuming.