Ditch YouTubeAPI (BETA)
DYA ( Ditch YouTube API ) is a package created to power the user with YouTube Data API functionality without any API Key
-
Got questions? Having issues? Join Discord
-
How to use?
-
Installation:
pip install dya
-
Importing DYA:
from DYA import *
-
Create an instance of target YouTube Channel:
-
channel = Channel("Channel ID/ Custom ID/ URL/ CustomURL") -
Attributes:
-
liveReturns True if channel is Live at that moment, Otherwise returns False
-
stream_linkReturns URL of Livestream if channel is Live at that moment, otherwise returns None
-
latest_uploads(*limit:int [optional])Returns List of latest uploaded videos as Video Object if channel is not live at that moment, otherwise returns None
-
infoReturns a Dict of the About of the YouTube Channel. Dict contains channel Name, Subscribers, Description, Total Views, Joining Date, Country, Custom URL, Channel Avatar URL, Channel Banner URL
-
playlistsReturns a list of Playlist Objects of the channel's public playlists
-
Or, you can use independent attributes to get channel info:
nameReturns Name of the channel or NoneidReturns ID of the channel or NonesubsReturns Sub-count of the channel or Nonetotal_viewsReturns total number of Views of the channel or NonejoinedReturns channel creation date or NonecountryReturns the generic country of the channel or Nonecustom_urlReturns the Custom URL of the channel or NonedescriptionReturns the Description of the channel or Noneavatar_urlReturns the Avatar URL of the channel or Nonebanner_urlReturns the Banner URL of the channel or None
-
-
-
Create an instance of YouTube Search:
-
query = Search() -
Get Videos by YouTube Search:
-
Result = query.video(*keywords: str)Returns a Video Object according to queries.
-
Results = query.videos(*keywords: str, *limit:int [optional])Returns a list of Video Objects according to queries.
-
-
Get Channels by YouTube Search:
-
Result = query.channel(*keywords: str)Returns a Channel Object according to queries.
-
Results = query.channels(*keywords: str, *limit:int [optional])Returns a list of Channel Objects according to queries.
-
-
Get Playlists by YouTube Search:
-
Result = query.playlist(*keywords: str)Returns a Playlist Object according to queries.
-
Result = query.playlists(*keywords: str, *limit:int [optional])Returns a list of Playlist Objects according to queries.
-
-
-
Create an instance of Video Data:
-
vid = Video("Video ID") -
Attributes:
info
Returns a Dict of video information { title, views, likes, dislikes, parent, duration, upload_date, thumbnail, tags } etc.
-
Or, you can use independent attributes to get each info individually:
titleReturns title of the videoviewsReturns view count of the videolikesReturns total likes on the videodislikesReturns total dislikes on the videoparentReturns channel id from which the video belongdurationReturns duration of the videouploadedReturns date of upload of the videourlReturns url of the videothumbnailReturns HQ Thumbnail of the videotagsReturns list of tags of the video
-
-
Create an instance of Playlist Data:
-
playlist = Playlist("playlist_id") -
Attributes:
-
infoReturns a dict of info of the playlist containing playlist's name, video count, video ids, thumbnail URL, playlist URL
-
Or, you can use independent attributes to get each info individually:
nameReturns the name of the playlist or NoneurlReturns the URL of the playlist or NonevideosReturns the list of Video Objects of the videos in playlist or Nonevideo_countReturns the video count of the playlist or NonethumbnailReturns the Thumbnail of the playlist or None
-
-
-
Create an instance of YouTube Extras:
-
extras = Extras() -
Attributes:
TrendingReturns #1 Trending Video ObjectMusicReturns fresh trending list of Music Video Objects [ Video Object ]GamingReturns fresh trending list of Gaming Video Objects [ Video Object ]NewsReturns fresh trending list of News Video Objects [ Video Object ]LiveReturns fresh trending list of Live Video Objects [ Video Object ]LearningReturns fresh trending list of Educational Video Objects [ Video Object ]SportsReturns fresh trending list of Sports Video Objects [ Video Object ]
-