Skip to main content

Access YouTube Public Data without YouTube API

Project description

Release

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

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

aiotube-1.7.2.tar.gz (9.7 kB view hashes)

Uploaded Source

Built Distribution

aiotube-1.7.2-py3-none-any.whl (12.0 kB view hashes)

Uploaded Python 3

Supported by

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