This project provides a convenient solution for summarizing ideas and suggestions shared in the comments section of this video. The content creator requested viewers to share their ideas with the prefix "fpfikir-". The project fetches YouTube comments manually using the YouTube API, filters those with the specified prefix, and utilizes OpenAI's gpt-3.5-turbo to generate a summary of all relevant comments based on this prompt. The summarized results are saved in config/summarized.json.
Please note that the code may be a bit unpolished, as this was a fun project created for a specific purpose and not intended for reuse.
Although created for fun, this project can be adapted for various purposes. Please review the LICENSE for details.
- Populate config/data[n].json with your comments data (see Getting Your Own Comment Data for instructions).
- Run
npm run build
to build the code for production. - Complete the .env.tmpl file and rename it as
.env
. - Run
npm start
to initiate the process. - (Optional) Utilize a "JSON to CSV/EXCEL" tool to simplify reading the results (config/summarized.json).
To obtain your comment data, follow these steps:
- Visit the YouTube API commentThreads list page.
- Complete the form on the right side:
- part: Enter
id,snippet
- maxResults: Enter
100
(the maximum allowed value) - order: Select
time
- pageToken: Leave blank for the first run; for subsequent runs, enter the
nextPageToken
value from the previous response (inside quotes) - videoId: Enter your video ID (found in the URL after
watch?v=
)
- part: Enter
- Under "Credentials" at the bottom, click "Show scopes" and enable the listed option.
- Click "EXECUTE" and sign in with a Google account. If the video is public, any Google account can be used.
Repeat the process until there are no remaining pages (totalResults < 100).