Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Readme
|Release|
.. |Release| image:: https://github.com/jnsougata/aiotube/actions/workflows/publish.yml/badge.svg :target: https://github.com/jnsougata/aiotube/actions/workflows/publish.yml
A library to access YouTube Public Data without YouTubeAPI
Discord <https://discord.gg/YAFGAaMrTC>
_GitHub <https://github.com/jnsougata/AioTube>
_REST API (BETA) <https://aiotube.deta.dev/>
_Installation <#installing>
_Building <#build-from-source>
_Quick Start <#quick-start>
_Usage <#usage>
_Channel <#channel>
_Video <#video>
_Playlist <#playlist>
_Python 3.6 or higher is required
.. code:: sh
# Linux/macOS
python3 -m pip install -U aiotube
.. code:: sh
# Windows
python -m pip install -U aiotube
.. code:: sh
pip install git+https://github.com/jnsougata/aiotube
.. code:: py
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
Channel
.. csv-table::
:header: "Method", "Return Type", "Description"
:widths: 80, 80, 100
"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"
.. csv-table::
:header: "Properties", "Return Types", "Description"
:widths: 80, 80, 100
"metadata", "dict", "Returns the metadata of the channel in dict format"
Video
~~~~~
.. csv-table::
:header: "Properties", "Return Types", "Description"
:widths: 80, 80, 100
"metadata", "Dict[str, Any]", "dictionary of video metadata"
Playlist
.. csv-table:: :header: "Property", "Return Type", "Description" :widths: 80, 80, 100
"metadata", "Dict[str, Any]", "dictionary of playlist metadata"
Search
.. csv-table::
:header: "Methods", "Return Types", "Description"
:widths: 80, 80, 100
"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"
FAQs
Access YouTube Public Data without YouTube API
We found that aiotube demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.