Supported features:
- Upload session videos to YouTube.
- Generate PyCon YouTube channel video data. Purpose: Generating PyCon YouTube channel video data for PyVideo usage
- Update existing PyConTW youtube playlist's video descriptions.
To use:
- Clone the project.
- Add
.env
in project containing:
# ===== Followings are for required by all commands =====
# First day of the PyConTW conference.
YEAR='2022'
MONTH='9'
DAY='3'
# ===== Followings are for upload videos =====
# Point to the directory containing video files.
# Video files should be named by the session title. They don't need to be
# exactly identical, the script will use fuzzy match to find them.
VIDEO_ROOT='path/to/directory/containing/video/files'
# ===== Followings are for upload videos and update video description =====
# YouTube OAuth2 secret files, downloaded from Google Console.
OAUTH2_CLIENT_SECRET='path/to/oauth-client-secret.json'
# Get talks list API (video session api).
URL='https://tw.pycon.org/prs/ccip/'
# ===== Followings are for playlist generation and update =====
# YouTube data v3 API key
YOUTUBE_API_KEY='YOUR_YOUTUBE_API_KEY'
# ===== Followings are for playlist generation =====
# YouTube channel information
# You can provide CHANNEL_ID & PLAYLIST_TITLE
# or provide PLAYLIST_ID information is enough
CHANNEL_ID='YOUR_YOUTUBE_CHANNEL_ID'
PLAYLIST_TITLE='YOUR_YOUTUBE_PLAYLIST_TITLE'
# PLAYLIST_ID='YOUR_PLAYLIST_ID'
# ===== Followings are for playlist description update =====
# YouTube playlist information
PLAYLIST_ID='YOUR_PLAYLIST_ID'
pipenv sync
pipenv run upload
for uploading session videospipenv run playlist
for generating video playlist datapipenv run update_desc
for updating video playlist description
The overall flow looks like the following:
- No 2FA may be a must.
- If your uploading device is the 1st time to upload, or your last uploading is too long ago, you may need an SMS validation for your device because of security concern.
- The corresponding credential json may need to update (by the channel owner of youtube/gmail account)
- This app needs approval by the channel owner's youtube/gmail account (via web browser by clicking the authorization link).
- In 2020 we are aware that Google Security Team will review your uploaded videos via your customized application. The uploaded videos are "private(locked)" by default and not allowed to set as "public" manually until the approval of Google Security Team.
See Contributing
Created from Lee-W/cookiecutter-python-template version 1.4.0