A Python package to interact with YouTube Data API v3.
Project description
YouTube Gears
A Python package for uploading videos to YouTube.
Example
import logging
import tqdm
import ytb_gears
def main():
logging.basicConfig(level=logging.INFO)
client_secret_file = "client_secret.json"
video_path = "test.mp4"
if ytb_gears.today_already_uploaded(client_secret_file):
return
print(f"即将上传视频: {video_path}")
with tqdm.tqdm(total=100) as pbar:
def update_progress(progress: float):
pbar.update(int(progress * 100) - pbar.n)
ytb_gears.upload(
video_path,
client_secret_file,
"YouTube Gears Test Video",
"Uploaded by YouTube Gears",
"ytb-gears",
"22",
"unlisted",
progress_callback=update_progress,
)
main()
Proxy
import os
os.environ["HTTP_PROXY"] = "http://127.0.0.1:7890"
os.environ["HTTPS_PROXY"] = "http://127.0.0.1:7890"
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
ytb_gears-0.2.1.tar.gz
(15.7 kB
view details)
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 ytb_gears-0.2.1.tar.gz.
File metadata
- Download URL: ytb_gears-0.2.1.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b174f9c3e08d4c39eeaadbf16a07f6f176c043ef99f165de1b692fbaa92c301
|
|
| MD5 |
d01f3f5f29bd4626a21176d1e98dd35a
|
|
| BLAKE2b-256 |
6fe3f8e30aeca79c1e51f1a2e51ce5e4d72d3e71ac2569fc7012a74ceeb1abc7
|
File details
Details for the file ytb_gears-0.2.1-py3-none-any.whl.
File metadata
- Download URL: ytb_gears-0.2.1-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd31732973ea69f113a79893191846039277dc4bd00ac0b25ac7ebd574a05053
|
|
| MD5 |
764c4a1c0d327576ab927db2529c73ec
|
|
| BLAKE2b-256 |
a7ef34d1bedcbe0c2ae558e42c218afd593f1b1924841bc2e3e5e716dcd66c76
|