Skip to content

Conversation

@aninhasalesp
Copy link

Add command to download YouTube video transcriptions

Overview

This PR introduces the VideoTranscription command, which downloads video transcriptions based on language code, path, and list of video IDs or URLs (or CSV filename with URLs/IDs inside). The transcriptions are saved to a specified destination directory, and the results are reported.

Features

  • Command Implementation: video-transcription command to handle the download of video transcriptions.
  • Command Execution: Enhanced execute method to handle the end-to-end process of fetching video transcriptions and saving them to the output directory.

Usage

To use the new video-transcription command:

  1. From a list of video IDs:
python cli.py --api-key <api_key> video-transcription --ids <id1> <id2> --output-dir <output_path> --language-code <language_code>
  1. From a list of URLs:
python cli.py --api-key <api_key> video-transcription --urls <url1> <url2> --output-dir <output_path> --language-code <language_code>
  1. From a CSV file containing video IDs or URLs:
python cli.py --api-key <api_key> video-transcription --input-file-path <input_csv_path> --output-dir <output_path> --language-code <language_code>

@aninhasalesp aninhasalesp marked this pull request as ready for review July 5, 2024 04:01
turicas and others added 29 commits July 8, 2024 10:21
Now it's iterable and yield download statuses
- Implemented  method to convert a list of dictionaries into a CSV file or string;
…RLs or a CSV file containing URLs;

- Added commands directory structure
fix: show error with parser if not in debug mode
- Changed file path passing to use  from  in the  method;
…and return a string;

- Added logic to convert values retrieved from the CSV file to strings before appending them to the data list;
@aninhasalesp aninhasalesp force-pushed the feature/video-transcription branch from 370fc6f to 160cecd Compare September 18, 2024 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants