{"id":26085993,"url":"https://github.com/lorenzomorelli-webdev/youlearn","last_synced_at":"2025-03-09T06:33:20.747Z","repository":{"id":281333884,"uuid":"944956489","full_name":"lorenzomorelli-webdev/youLearn","owner":"lorenzomorelli-webdev","description":"YouLearn is a Python tool that transcribes YouTube videos and generates AI-powered summaries using either OpenAI's GPT or Deepseek's models.","archived":false,"fork":false,"pushed_at":"2025-03-08T10:42:43.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-08T11:27:50.428Z","etag":null,"topics":["ai","learning","python","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/lorenzomorelli-webdev.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-08T10:16:26.000Z","updated_at":"2025-03-08T10:43:30.000Z","dependencies_parsed_at":"2025-03-08T11:37:55.419Z","dependency_job_id":null,"html_url":"https://github.com/lorenzomorelli-webdev/youLearn","commit_stats":null,"previous_names":["lorenzomorelli-webdev/youlearn"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzomorelli-webdev%2FyouLearn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzomorelli-webdev%2FyouLearn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzomorelli-webdev%2FyouLearn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzomorelli-webdev%2FyouLearn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lorenzomorelli-webdev","download_url":"https://codeload.github.com/lorenzomorelli-webdev/youLearn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242656038,"owners_count":20164431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["ai","learning","python","youtube"],"created_at":"2025-03-09T06:33:19.998Z","updated_at":"2025-03-09T06:33:20.719Z","avatar_url":"https://github.com/lorenzomorelli-webdev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YouLearn\n\nYouLearn is a Python tool that transcribes YouTube videos and generates AI-powered summaries using either OpenAI's GPT or Deepseek's models.\n\n## Features\n\n- Extract transcripts from YouTube videos\n- Automatic transcription using Whisper when YouTube subtitles are not available\n- Generate summaries using either OpenAI's GPT or Deepseek's AI models\n- Support for both standard YouTube videos and Shorts\n- Clean output organization in a dedicated directory\n\n## Prerequisites\n\n- Python 3.7+\n- FFmpeg installed and added to PATH\n- OpenAI API key and/or Deepseek API key\n\n## Installation\n\n1. Clone the repository:\n\n```bash\ngit clone \u003crepository-url\u003e\ncd youlearn\n```\n\n2. Install the required Python packages:\n\n```bash\npip install -r requirements.txt\n```\n\n3. Install FFmpeg:\n\n   - Windows: Download from [FFmpeg official website](https://ffmpeg.org/download.html)\n   - Mac: `brew install ffmpeg`\n   - Linux: `sudo apt-get install ffmpeg`\n\n4. Create a `.env` file in the project root and add your API keys:\n\n```env\nOPENAI_API_KEY=your_openai_api_key_here\nDEEPSEEK_API_KEY=your_deepseek_api_key_here\n```\n\n## Usage\n\nBasic usage:\n\n```bash\npython youlearn.py \"https://www.youtube.com/watch?v=VIDEO_ID\"\n```\n\nGenerate summary with OpenAI (default):\n\n```bash\npython youlearn.py \"https://www.youtube.com/watch?v=VIDEO_ID\" --summarize\n```\n\nGenerate summary with Deepseek:\n\n```bash\npython youlearn.py \"https://www.youtube.com/watch?v=VIDEO_ID\" --summarize --ai-service deepseek\n```\n\n### Command Line Arguments\n\n- `url`: YouTube video URL (required)\n- `--summarize`: Generate an AI summary of the transcript\n- `--ai-service`: Choose the AI service for summarization (choices: \"openai\", \"deepseek\", default: \"openai\")\n\n## Output\n\nThe script creates an `output` directory containing:\n\n- `video_title_transcript.txt`: The video transcript\n- `video_title_openai_summary.txt` or `video_title_deepseek_summary.txt`: The AI-generated summary (if requested)\n\n## Notes\n\n- The script will first attempt to get subtitles directly from YouTube\n- If no subtitles are available, it will download the audio and use Whisper for transcription\n- Summaries are generated using either OpenAI's GPT-3.5-turbo or Deepseek's model\n- The script automatically handles video title sanitization for file naming\n\n## Error Handling\n\n- Missing API keys will result in appropriate warning messages\n- FFmpeg installation is verified before processing\n- Invalid YouTube URLs are detected and reported\n- Failed transcriptions or summarizations are handled gracefully\n\n## Contributing\n\nFeel free to open issues or submit pull requests for any improvements.\n\n## License\n\n[Your chosen license]\n\n## Acknowledgments\n\n- [youtube-transcript-api](https://github.com/jdepoix/youtube-transcript-api)\n- [yt-dlp](https://github.com/yt-dlp/yt-dlp)\n- [OpenAI Whisper](https://github.com/openai/whisper)\n- [OpenAI API](https://openai.com/api/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Florenzomorelli-webdev%2Fyoulearn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Florenzomorelli-webdev%2Fyoulearn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Florenzomorelli-webdev%2Fyoulearn/lists"}