Skip to main content

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:

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)
  • 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()

CLI capability:

  • In base environment, you need the following files to run 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] Example: Command Line Interface (CLI) explained

"""This has been deprecated; however, if you want to clone this repository for familiarity and function, this option still remains."""
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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ytad-0.0.7.1.tar.gz (29.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ytad-0.0.7.1-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file ytad-0.0.7.1.tar.gz.

File metadata

  • Download URL: ytad-0.0.7.1.tar.gz
  • Upload date:
  • Size: 29.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.12

File hashes

Hashes for ytad-0.0.7.1.tar.gz
Algorithm Hash digest
SHA256 7d1d4ee11df44e81d2d6991ee5e4347299a1b9bda13091811c76d93cc7a74cf3
MD5 4d39566fc03aff034e1443657a0c83de
BLAKE2b-256 2ef4b65672d1069aac91ce6f5572e34e84c16506744b952ecb4d81955c971e3d

See more details on using hashes here.

File details

Details for the file ytad-0.0.7.1-py3-none-any.whl.

File metadata

  • Download URL: ytad-0.0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.12

File hashes

Hashes for ytad-0.0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6a5517312d6a07314d6a738d7f14f2ca3a95a428ea202f5909d8ad04db10d188
MD5 5f2f23d4ee1e8916b9679b45c61e3a12
BLAKE2b-256 2e84f22adced636050a99a5f0d4690dda45c069a17045fd4ca687fd4fa4f067b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page