Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/falconlee236/youtube-comment-to-mysql
searching youtube comment by using Youtube API
https://github.com/falconlee236/youtube-comment-to-mysql
crawl crawling crwaler json mysql mysql-table python python3 selenium selenium-python youtube youtube-api youtube-comment
Last synced: 10 days ago
JSON representation
searching youtube comment by using Youtube API
- Host: GitHub
- URL: https://github.com/falconlee236/youtube-comment-to-mysql
- Owner: falconlee236
- License: mit
- Created: 2020-02-05T06:42:56.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-07T03:29:34.000Z (6 months ago)
- Last Synced: 2024-07-07T04:31:55.431Z (6 months ago)
- Topics: crawl, crawling, crwaler, json, mysql, mysql-table, python, python3, selenium, selenium-python, youtube, youtube-api, youtube-comment
- Language: Python
- Homepage:
- Size: 9.81 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
YouTube-Comment-TO-MySQL
=============
Comment_to_MySQL made by **python** language program, which works searching youtube comment by using Youtube APIThis program's Result is stored into MySQL table schema
## Code style
![python code style](https://img.shields.io/badge/codestyle-PEP8-brightgreen)
## Screenshots
![example](./img/example.PNG)
Using this data and list, I Insert this data into MySQL table,
![Comment_in_MySQL](./img/Comment_in_MySQL.PNG)
## Prerequisite Module
You can use **requirments.txt** to install necessary module simply.
![emoji version](https://img.shields.io/badge/emoji-v0.6.0-brightgreen)
![google-auth-oauthlib version](https://img.shields.io/badge/google--auth--oauthlib-v0.4.2-red)
![google--api--python--client version](https://img.shields.io/badge/google--api--python--client-v1.12.8-orange)
![google--auth](https://img.shields.io/badge/google--auth-v1.24.0-yellow)
![google--auth--httplib2](https://img.shields.io/badge/google--auth--httplib2-v0.0.4-green)
![pandas](https://img.shields.io/badge/pandas-v1.0.0-yellowgreen)
![numpy](https://img.shields.io/badge/numpy-v1.19.3-red)
![PyMySQL](https://img.shields.io/badge/PyMySQL-v0.10.1-ff69b4)## Features
This program using Youtube API crawls **much more youtube video comment** than using selenium and beautifulsoup python module.
| [Left] using selenium and chromedriver | [Right] using youtube API and MySQL |
| ----------------------------------------------------------- | ------------------------------------------------------------ |
| Max comment = 1500
total video's comment = 15,000,000 | Max comment = up to 15,000,000
total video's comment = 15,000,000 |
| | |This program is slower than the way to selenium crawling But more precise than that way
If you're using **Bigdata and Artificial Intelligence** or if you're a **Data Scientist and Data Analyst** , You must need to this program to use much many youtube comment data and to analyze youtube environment.
## Installation
1. clone this repository to local
2. issue your own OAuth 2.0 Client ID json file >>> Issue Guideline
3. Rename OAuth json file to `client_secret.json`
4. In Terminal, Change your main directory and write this code
```python
> python src\Comment_to_MySQL.py
"Enter a video_id" : #Enter target video id
'''
if your target youtube address is https://www.youtube.com/watch?v=YWt4wmZ_EMI
you should put target video id YWt4wmZ_EMI
'''
```5. IF Authorization is successfully, You will see
`"Please visit this URL to authorize this application : ~~~~~~~~"`
`"Enter the authorization code :"`
After visit that URL and Complete Authorization, get authorization code and enter the code6. IF You execute program first, You will enter MySQL info to connect DB
```python
"Your user name? Ex) root : "
"Your user passwd? Ex) 123456 : "
"Your host name? Ex) localhost : "
"Your Database Schema name? Ex) sys : "
"charset of Database Schema? Ex) utf8 : "
```After that, the json file is made in local repository, `MySQL_Auth.json`
7. After connecting MySQL and python, program needs to find table name. if there is existing DB table in local, DO NOT execute create table query. But Do not exist, Create Table You are typing name in program8. Do you want to save comment result, put in "y" when this code to see `Do you want to save your changes? (y/n) : `
## API Reference
Go to this page >>> API Reference
## Contact
Naver= [email protected]
Google= [email protected]
IF you find error code, plz contact upper email address or Issue or pull request or fork
PLZ STAR AND FORK!!!!!!!!!!
Welcome for contribution