The idea for this application was contributed by the developer, and the entire code was written with the help of ChatGPT only. The developer organized the code generated by ChatGPT, and in case of any issues, the developer sought assistance from ChatGPT to provide a solution.
Medium Story of this application: https://mantoshk.medium.com/demystifying-chatgpt-separating-fact-from-fiction-bfe2354e83ae
-
First install all requirements: pip install -r requirements.txt
-
Replace the content of ".env" file with following: PRIVATE_API_KEY_PATH="./"
// Note: You need to generate your own Google Application credentials (see Section 4)
GOOGLE_APPLICATION_CREDENTIALS=./youtube-comment-stalker-xxxxfffxx.json
-
Run the script: python run.py
When you run the program, it will prompt you to enter the URL of the YouTube video you want to fetch comments from. It will then fetch all the comments using the YouTube API and save them to a file in the format <video_id>_comments.txt.
-
Input: 'https://www.youtube.com/watch?v=QUYODQB_2wQ&lc=UgyiYJzk2XMGjuIjsSx4AaABAg.9mYftIxYoRS9mgn2hI2WRg'
Please note that application prefers long URLs.
2. Revolutionizing Content Creation with ChatGPT: Harnessing YouTube Comments with AI Text Summarization:
The developer made the following contributions to the project:
- Idea Generation: The idea for the project was to use YouTube comments as a source of content creation, which would otherwise be difficult to manually browse through. The application aims to extract all comments and then use AI-based text summarization tools like SummarizeBot or Resoomer to create summaries of lengthy comments.
- Guiding ChatGPT: The developer assisted ChatGPT in reaching a functional solution by prompting it to consider nested comments and replies, rather than just the top-level comments initially considered.
ChatGPT is not a magical solution for all problems. It requires structural thinking and prompt engineering to make the most out of it.
Simply having access to advanced tools like ChatGPT does not guarantee success; users must have the necessary skills and knowledge to use it effectively.
Therefore, it is crucial to focus on developing prompt engineering skills to fully leverage the capabilities of ChatGPT and other advanced tools.
To create GOOGLE_APPLICATION_CREDENTIALS or explicitly create credential: please see https://cloud.google.com/docs/authentication/getting-started
To create a service account and generate a service account key file for your Google Cloud Platform project, follow these steps:
- Go to the Google Cloud Console (https://console.cloud.google.com/)
- Select your project from the dropdown in the top navigation bar.
- Click on the "IAM & admin" option from the left-hand navigation menu.
- Click on the "Service accounts" option.
- Click on the "+ CREATE SERVICE ACCOUNT" button.
- Enter a name and description for your service account.
- Click on the "CREATE" button.
- Grant the service account appropriate permissions to access the YouTube Data API.
- Click on the "CREATE KEY" button.
- Select the JSON key type and click on the "CREATE" button.
- The key file will be downloaded to your local machine.
- Once you have the service account key file, set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the file path of the key file in your Python script. You can then use the Google Cloud SDK to authenticate and access the YouTube Data API.
- YouTube Data API: https://developers.google.com/youtube/v3/docs/?apix=true