Skip to content

Summarize YouTube comments πŸ’¬ filtered by a prefix, using ChatGPT, and save to JSON πŸ“. Fun project! πŸ˜„

License

Notifications You must be signed in to change notification settings

unitythemaker/youtube-comment-summarizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

YouTube Comment Summarizer

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.

Usage

  1. Populate config/data[n].json with your comments data (see Getting Your Own Comment Data for instructions).
  2. Run npm run build to build the code for production.
  3. Complete the .env.tmpl file and rename it as .env.
  4. Run npm start to initiate the process.
  5. (Optional) Utilize a "JSON to CSV/EXCEL" tool to simplify reading the results (config/summarized.json).

Getting Your Own Comment Data

To obtain your comment data, follow these steps:

  1. Visit the YouTube API commentThreads list page.
  2. 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=)
  3. Under "Credentials" at the bottom, click "Show scopes" and enable the listed option.
  4. 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).

About

Summarize YouTube comments πŸ’¬ filtered by a prefix, using ChatGPT, and save to JSON πŸ“. Fun project! πŸ˜„

Topics

Resources

License

Stars

Watchers

Forks