Skip to content

BrutalBotX/youtube_commentsXtractor

Repository files navigation

youtube_commentsXtractor

As suggested by the name, all it does it extract comments when a Youtube URL and a account name is provided.

Requirements

We'll first need a youtube data api to access it's contents. So let's go to Google Cloud Console and login/signup there.

Then follow these screenshots to get your API key:

  1. First make a new project and make sure you are in it. App Screenshot

  2. Go to Youtube data API. App Screenshot

  3. Enable it. App Screenshot

  4. Click the Create 'Credentials button'. App Screenshot

  5. Click 'Public data' and then click 'next'. App Screenshot

  6. Copy your API key and then come out of there. App Screenshot

  7. Paste your API key in the python code you're trying to run (There'll be a comment beside it, to make it easy to find)

  8. (For yt_cmall_ui.py) Make sure you put in the location of the frame0 folder you download from here, in the python file, it should also be commented for easy access

Now, that's that, we'll now continue to get credentials for the auto replier (Skip, if you're not thinking of using it):

  1. Select your project from the drop down menu above, then select Consent section from the side menu. App Screenshot

  2. Click Create credentials. App Screenshot

  3. Click OAuth client ID. App Screenshot

  4. Choose Desktop App.

  5. Choose a name for it and click create.

  6. Click save and download the json file.

  7. Rename the json file to client_secret.json and place it in the same directory as the python files.

  8. Also, place the main and rep folder in the same directory if using the version 2 and auto replier.

Deployment

I've provided both CLI and GUI versions, so you run try any of them.

For CLI, make sure that google-api-python-client and urllib is installed. If not run this:

  pip install google-api-python-client

For GUI version, tkinker is required, it's in the optional feature list when installing python, so make sure you checked that box.

All of these steps are best done in a virtual environment to keep things clean.

Usage/Examples

Make sure you are in the virtual environment (if using)

<dir_name>/bin/activate

#CLI

python yt_comments.py

#GUI

python yt_comments_ui.py

#GUI (All comments version)

python yt_cmall_ui.py

#GUI (All comments version 2)

python yt_cmall_ui2.py

#Auto Replier

python yt_reply.py

Or through GUI V2

$ While using the Auto replier, it will ask for user login, open the link provided in the terminal and log in the same account with which you created the json file, give your consent and copy the code and paste it into the terminal.

Screenshots

Youtube comments section: App Screenshot

CLI: App Screenshot

GUI: App Screenshot

GUI(All comments version): App Screenshot

GUI(All comments version 2): App Screenshot

GUI(Auto Replier): App Screenshot Exported CSV file:

App Screenshot

Flowchart

App Screenshot

About

As suggested by the repository name

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages