aiotube
A library to access YouTube Public Data without YouTubeAPI
Table of Contents
Installing
Python 3.6 or higher is required
# Linux/macOS
python3 -m pip install -U aiotube
# Windows
python -m pip install -U aiotube
Build from source
pip install git+https://github.com/jnsougata/aiotube
Quick Start
import aiotube
channel = aiotube.Channel('UCU9FEimjiOV3zN_5kujbCMQ')
print(channel.metadata) # channel metadata in dict format
video = aiotube.Video('WVDT4lSozHk')
print(video.metadata) # video metadata in dict format
playlist = aiotube.Playlist('PL-xXQjd8X_Q-xXQjd8X_Q-xXQjd8X_Q-')
print(playlist.metadata) # playlist metadata in dict format
search = aiotube.Search.video('YouTube Rewind 2018')
print(search.metadata) # searched video metadata in dict format
search = aiotube.Search.channel('PewDiePie')
print(search.metadata) # searched channel metadata in dict format
search = aiotube.Search.playlist('Unlock Your Third Eye')
print(search.metadata) # searched playlist metadata in dict format
Usage
Channel
Method |
Return Type |
Description |
|---|---|---|
live() |
bool |
Returns True if the channel is live |
streaming_now() |
Video |
Returns the video the channel is streaming now |
current_streams() |
List[str] |
Returns a list of ids of currently streaming videos |
old_streams() |
List[str] |
Returns a list of ids of previously streaming videos |
video_count() |
int |
Returns the number of videos uploaded by the channel |
upcoming() |
Video |
Returns a video object of the upcoming video |
upcomings() |
List[str] |
Returns a list of ids of upcoming videos |
playlists() |
List[str] |
Returns a Playlist object |
uploads(limit: int) |
List[str] |
Returns a list of video ids of the uploaded videos |
last_uploaded() |
Video |
Video object of the most recently uploaded video |
last_streamed() |
Video |
Video object of the most recently streamed video |
Properties |
Return Types |
Description |
|---|---|---|
metadata |
dict |
Returns the metadata of the channel in dict format |
Video
Properties |
Return Types |
Description |
|---|---|---|
metadata |
Dict[str, Any] |
dictionary of video metadata |
Playlist
Property |
Return Type |
Description |
|---|---|---|
metadata |
Dict[str, Any] |
dictionary of playlist metadata |
Search
Methods |
Return Types |
Description |
|---|---|---|
channel(name: str) |
Channel |
Channel object of the channel with the given keywords |
video(name: str) |
Video |
Video object of the video with the given keywords |
playlist(name: str) |
Playlist |
Playlist object of the playlist with the given keywords |
channels(name: str, limit: int) |
List[str] |
list of channel ids of the channels found with the given keywords |
videos(name: str, limit: int) |
List[str] |
list of video ids of the videos found with the given keywords |
playlists(name: str, limit: int) |
List[str] |
list of playlist ids of the playlists found with the given keywords |
Release files for aiotube 1.7.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aiotube-1.7.2.tar.gz | 9.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aiotube-1.7.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.8 kB
Release files / aiotube-1.7.2.tar.gz
| Download URL | aiotube-1.7.2.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
398201e751323d690f600ca6493ddbedceda3864b22f4177dc69b80d29cd9e8a
|
|
BLAKE2b-256 checksum How to use checksums |
502a233afdbbbd337bd281e02536f191fb733f1947b72e792474c2aca16b0953
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / aiotube-1.7.2-py3-none-any.whl
| Download URL | aiotube-1.7.2-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c3cd55a8ddea17d15b6a45e44a19f9e342b8cc2801cf757ba20aea478c0aca41
|
|
BLAKE2b-256 checksum How to use checksums |
e9d56f5165c4f237b3dd47940049b0891d5e9daf0415c69d02c0722f326572e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|