PyTubeLib is a tool for interacting with the YouTube Data v3 API using Python. With PyTubeLib, you can search for channels and videos using keywords, get details about specific channels and videos, and search for the latest videos from a channel. The class is designed to handle common API errors and returns results in JSON format for easy processing.
Project description
PyTubeLib
Installation
pip install pytubelib
Usage
from pytubelib import YTAPI
# Load credentials from a JSON file
creds_file = '/path/to/credentials.json'
# Create an instance of the YTAPI class
yt = YTAPI(creds_file)
# Search for channels by keyword
channels = yt.search_channels('xXBlackDev9010Xx')
# Get details for the first channel in the list
channel_id = channels[0]
channel_details = yt.get_channel_details(channel_id)
# Search for videos in the channel by keyword
videos = yt.search_new_videos(channel_id, 'tutorial')
# Get details for the first video in the list
video_id = videos[0]['id']['videoId']
video_details = yt.get_video_details(video_id)
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 pytubelib-0.0.1.tar.gz.
File metadata
- Download URL: pytubelib-0.0.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
299c839596b7e6e9392cb90281aa7815ff98b6b502cfa1292ea0ad189a85420a
|
|
| MD5 |
a6d6f622b05eb889a287802a7e602e29
|
|
| BLAKE2b-256 |
dac11d79c29d9f2fb79d909c9389460c5f86957216998dbcaa34a755d3440b04
|
File details
Details for the file pytubelib-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pytubelib-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
501f8a96db26b9c8363faaa78bee4fe3ece4d43162b5b66d220eccd0bac75f2b
|
|
| MD5 |
cb009670d5298bffb2e9ab4f81666c4e
|
|
| BLAKE2b-256 |
e70afef0c53642757f9bc2e6f92344a9fdab1f975e5c2acf60d7b6bfc59414d7
|