{"id":15859267,"url":"https://github.com/michaelcade/youtube_vid_scraper","last_synced_at":"2025-11-07T16:30:31.765Z","repository":{"id":245101747,"uuid":"817246486","full_name":"MichaelCade/youtube_vid_scraper","owner":"MichaelCade","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-20T18:38:23.000Z","size":63753,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T19:38:22.432Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MichaelCade.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-06-19T10:06:22.000Z","updated_at":"2024-07-06T18:33:53.000Z","dependencies_parsed_at":"2024-06-19T21:24:46.836Z","dependency_job_id":null,"html_url":"https://github.com/MichaelCade/youtube_vid_scraper","commit_stats":null,"previous_names":["michaelcade/youtube_vid_scraper"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelCade%2Fyoutube_vid_scraper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelCade%2Fyoutube_vid_scraper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelCade%2Fyoutube_vid_scraper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelCade%2Fyoutube_vid_scraper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MichaelCade","download_url":"https://codeload.github.com/MichaelCade/youtube_vid_scraper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239533064,"owners_count":19654617,"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":[],"created_at":"2024-10-05T21:05:13.561Z","updated_at":"2025-11-07T16:30:31.732Z","avatar_url":"https://github.com/MichaelCade.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"```markdown\n# YouTube Playlist Scraper\n\nThis Go application fetches all videos from a specified YouTube playlist and exports their titles and URLs to a JSON file named `playlist_videos.json`.\n\n## Prerequisites\n\n- Go (1.15 or later recommended)\n- A YouTube API key with access to the YouTube Data API v3\n- The ID of the YouTube playlist you wish to scrape\n\n## Setup\n\n1. **Clone the Repository**\n\n   Clone this repository to your local machine using Git:\n\n   ```\n   git clone https://github.com/yourusername/youtube_playlist_scraper.git\n   ```\n\n2. **Set Environment Variables**\n\n   Set the `YOUTUBE_API_KEY` and `YOUTUBE_PLAYLIST_ID` environment variables. You can do this in your shell or within the application itself.\n\n   For a Unix-like shell, you can export the variables like so:\n\n   ```\n   export YOUTUBE_API_KEY='your_youtube_api_key_here'\n   export YOUTUBE_PLAYLIST_ID='your_playlist_id_here'\n   ```\n\n   Alternatively, you can hardcode them into the `main.go` file, but this is not recommended for security reasons.\n\n3. **Install Dependencies**\n\n   Navigate to the project directory and install the necessary Go dependencies:\n\n   ```\n   cd youtube_playlist_scraper\n   go get google.golang.org/api/youtube/v3\n   go get google.golang.org/api/googleapi/transport\n   ```\n\n## Running the Application\n\nTo run the application, execute the following command in the terminal from the project directory:\n\n```\ngo run main.go\n```\n\nUpon successful execution, the application will create a `playlist_videos.json` file in the project directory containing the titles and URLs of all videos in the specified YouTube playlist.\n\n## Output Format\n\nThe [`playlist_videos.json`](command:_github.copilot.openRelativePath?%5B%7B%22scheme%22%3A%22file%22%2C%22authority%22%3A%22%22%2C%22path%22%3A%22%2FUsers%2Fmichaelcade%2Fyoutube_vid_scraper%2Fplaylist_videos.json%22%2C%22query%22%3A%22%22%2C%22fragment%22%3A%22%22%7D%5D \"/Users/michaelcade/youtube_vid_scraper/playlist_videos.json\") file will have the following format:\n\n```json\n[\n  {\n    \"title\": \"Video Title 1\",\n    \"url\": \"https://www.youtube.com/watch?v=video_id_1\"\n  },\n  {\n    \"title\": \"Video Title 2\",\n    \"url\": \"https://www.youtube.com/watch?v=video_id_2\"\n  }\n]\n```\n\n## Bloggy \n\nThe bloggy.sh script processes a JSON file containing YouTube video information and generates markdown files with summaries for each video. Here's a step-by-step explanation:\n\nDefine the Path to the JSON File: It sets a variable json_file to \"playlist_videos.json\", indicating the script will read video information from this file.\n\nRead and Parse the JSON File: Using jq, a command-line JSON processor, it extracts each video entry from the JSON file. Each video entry is processed one by one in the subsequent steps.\n\nIterate Over Each Video: For each video entry, it does the following:\n\nExtracts the video's title and URL using jq.\nUses sed to extract a day number from the video title, assuming the title contains a pattern like \"Day X\" where X is the day number.\nConstructs a markdown file name based on the extracted day number, following the format dayX.md.\nExecute Commands for Each Video: It runs placeholder commands (yt and fabric) for each video. These commands are meant to:\n\nFetch the transcript of the video from its URL (using a hypothetical yt command).\nGenerate a summary of the transcript using a hypothetical fabric command with specified options (--pattern create_summary --model mistral:instruct).\nAppend the generated summary to the markdown file named dayX.md.\nFinal Output: After processing all videos, it prints a message indicating all videos have been processed.\n\n## yt command \n\n## fabric \n\n## Process \n\n![](process.png)\n\n\n## Thumbnails \n\nYou will notice a thumbnails folder this is only here for now to test the outcome, this should not be used by anyone else wanting to achieve this. ß\n\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n```\n\nThis README includes comprehensive setup and execution instructions for the YouTube Playlist Scraper application, including a section on automating the process with a bash script.\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelcade%2Fyoutube_vid_scraper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelcade%2Fyoutube_vid_scraper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelcade%2Fyoutube_vid_scraper/lists"}