{"id":26046785,"url":"https://github.com/dmmeteo/youtube-transcript-scraper","last_synced_at":"2026-04-18T01:35:01.437Z","repository":{"id":281074722,"uuid":"944121164","full_name":"dmmeteo/youtube-transcript-scraper","owner":"dmmeteo","description":"A CLI tool for downloading transcripts for all YouTube videos at a specified channel and creating training datasets for language models.","archived":false,"fork":false,"pushed_at":"2025-03-06T20:39:47.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-26T03:38:32.736Z","etag":null,"topics":["datasets","llm","ml","scraper","transcript","youtube"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmmeteo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-06T20:24:49.000Z","updated_at":"2025-03-06T20:46:36.000Z","dependencies_parsed_at":"2025-03-06T21:39:17.118Z","dependency_job_id":null,"html_url":"https://github.com/dmmeteo/youtube-transcript-scraper","commit_stats":null,"previous_names":["dmmeteo/youtube-transcript-parser"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dmmeteo/youtube-transcript-scraper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmmeteo%2Fyoutube-transcript-scraper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmmeteo%2Fyoutube-transcript-scraper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmmeteo%2Fyoutube-transcript-scraper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmmeteo%2Fyoutube-transcript-scraper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmmeteo","download_url":"https://codeload.github.com/dmmeteo/youtube-transcript-scraper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmmeteo%2Fyoutube-transcript-scraper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31953515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"ssl_error","status_checked_at":"2026-04-18T00:39:20.671Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["datasets","llm","ml","scraper","transcript","youtube"],"created_at":"2025-03-07T21:48:25.339Z","updated_at":"2026-04-18T01:35:01.421Z","avatar_url":"https://github.com/dmmeteo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YouTube Transcript Scraper\n\nA CLI tool for downloading transcripts for all YouTube videos at a specified channel and creating training datasets for language models.\n\n## Instructions for obtaining an API key for YouTube Data API v3\n\n1. Go to the [Google Cloud Console](https://console.cloud.google.com/).\n2. Create a new project or select an existing one.\n3. In the left menu, navigate to APIs \u0026 Services → Library and find YouTube Data API v3.\n4. Click Enable to activate the API for your project.\n5. Navigate to APIs \u0026 Services → Credentials.\n6. Click Create Credentials and select API key.\n7. Copy the API key you received and use it when running the script.\n\n## Setup\n\nWe use the `uv` package manager for dependency management. To set up the project:\n\n1. Create a virtual environment:\n```bash\nuv venv --python 3.13\n```\n\n2. Install dependencies:\n```bash\nuv sync\n```\n\n3. Activate the virtual environment:\n```bash\n# On macOS/Linux\nsource .venv/bin/activate\n\n# On Windows\n.venv\\Scripts\\activate\n```\n\n## Running the script\n```bash\npython main.py \"https://www.youtube.com/channel/UCXXXXXXX\" en $YOUR_API_KEY\n```\n\n## Environment Variables\nYou can also provide your API key using environment variables or a .env file:\n\n1. Create a .env file in the project directory\n2. Add your YouTube API key: `YOUTUBE_API_KEY=your_key_here`\n\nWhen using environment variables, you can run the script without providing the API key:\n```bash\npython main.py \"https://www.youtube.com/channel/UCXXXXXXX\" en\n```\n\n## Output Data Structure\n\nThe script generates JSON and JSONL files with the following structure:\n\n```json\n{\n  \"created\": \"2023-05-15T12:34:56Z\",\n  \"name\": \"Video Title\",\n  \"value\": \"Transcript text...\"\n}\n```\n\nWhere:\n- `created`: Publication date of the video\n- `name`: Title of the video\n- `value`: Transcript text (or \"no transcript available\" if none exists)\n\n## Dataset Files\n\nThe script creates the following files:\n\n- `dataset/full_dataset.jsonl`: Complete dataset in JSONL format (one JSON object per line)\n- `dataset/train.jsonl`: Training set (approximately 80% of data)\n- `dataset/val.jsonl`: Validation set (approximately 10% of data)\n- `dataset/test.jsonl`: Test set (approximately 10% of data)\n- `dataset/transcripts.json`: Complete dataset as a standard JSON file\n\n## Memory Efficiency\n\nThe script processes videos one at a time and writes each transcript directly to the JSONL file instead of keeping all transcripts in memory. This approach allows for processing large channels with many videos without memory issues.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmmeteo%2Fyoutube-transcript-scraper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmmeteo%2Fyoutube-transcript-scraper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmmeteo%2Fyoutube-transcript-scraper/lists"}