A tool for adding YouTube video like/dislike counts to video descriptions.
Project description
YouTube Automation
Using YouTube's API, this repository will work toward automating tedious tasks for YouTube channels. The main objective is to update YouTube Descriptions with the number of likes, dislikes, likes/(likes+dislikes), timestamp up to the YouTube API limit. Check out my YouTube Like, Dislike Counter Playlist!
Requirements:
- Python >= 3.7
- PyPi distribution
pip install ytad
Setup Requirements
-
Need YouTube account with at least one public video
-
Register your account with Google console developers
-
Need to enable API (YouTube Data API V3)
-
You have the choice to choose which OAuth to use; In production, I used Web App
- Create OAuth Client ID: > Web App > Name Web App App > Create > Download OAuth Client (JSON)
- This will be your web app secret file. (Rename downloaded OAuth Client to client_secret_web_app.json)
- Create OAuth Client ID: > Web App > Name Web App App > Create > Download OAuth Client (JSON)
-
Setup up OAuth Consent Screen
- Make sure to add your testing email as a test user to access your YouTube account (need to manually do this)
-
Ensure to verify your application! Run the following:
# creates a token.pickle file for authentication
from ytad.authentication import Authenticate
auth = Authenticate()
youtube = auth.check_token_web_app_data_api()
Command Line Interface (CLI) capability:
- In base environment, you need the following files to run: Update Video Description (uvd) successfully:
- client_secret_web_app.json
- token.pickle
uvd -h # input your arguments for ease of use.
# example (Using my YouTube Channel ID as an example...)
uvd --id=UCoCToADdJRd3u-ACz4e_iCw
[Deprecated] Command Line Interface (CLI) explained
"""This has been deprecated; see above for more integrated CLI capabilities"""
python update_notifications.py --help
python .\update_notifications.py --update_df=Yes --verify_each_update=Yes
Cloud
I used AWS services to ensure a cron job (in production) is enacted. This is a low cost solution, utlizing lambda functions and minimial time on Ec2 instances.
- The cloud setup and infrastructure can be found here
Goals of Library:
- Scrape personal Likes/Dislikes from backend (YouTube Studio)
- Automating the update(s) of descriptions in videos
- Executable with parameters and pip installable
- cron job
- Minimization of YouTube Requests
- Keygen for API calls
- argparse: CLI enabled.
- setup.py (on pypi) for installation
Remaining TODOs:
- Verify setup with @SpencerPao
- Overhaul CLI (maybe this should be another issue and version though)
- Test API and authentication
- Create PyPI and TestPyPI accounts
- Build package wheel
- Test package with
twine - Upload package with
twine - Try installing with
pip
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ytad-0.0.8.tar.gz.
File metadata
- Download URL: ytad-0.0.8.tar.gz
- Upload date:
- Size: 30.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50efcf8447936994b00b9c7600bae364b97228d156f5e147347e62b26f8ae7d6
|
|
| MD5 |
994b4c432dc1c92f4600104c5faff5cf
|
|
| BLAKE2b-256 |
2dbaaa0f7c1ff7ea9526d0c541cd71fa4388a86f7baba2ebc4d1e5320c03910f
|
File details
Details for the file ytad-0.0.8-py3-none-any.whl.
File metadata
- Download URL: ytad-0.0.8-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8109362153a12e8e4b202854540bd4f6e88f546f7822fa7777c94e15b8482a4
|
|
| MD5 |
846ca44b5c4ae6c6d8710ba87648bceb
|
|
| BLAKE2b-256 |
c862997dfc96fe0bc23cef43fc47088ad742c06f2affc6a39843fe94ab374a8f
|