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:
-
live
Returns True if channel is Live at that moment, Otherwise returns False
-
stream_link
Returns 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
-
info
Returns 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
-
playlists
Returns a list of Playlist Objects of the channel's public playlists
-
Or, you can use independent attributes to get channel info:
name
Returns Name of the channel or Noneid
Returns ID of the channel or Nonesubs
Returns Sub-count of the channel or Nonetotal_views
Returns total number of Views of the channel or Nonejoined
Returns channel creation date or Nonecountry
Returns the generic country of the channel or Nonecustom_url
Returns the Custom URL of the channel or Nonedescription
Returns the Description of the channel or Noneavatar_url
Returns the Avatar URL of the channel or Nonebanner_url
Returns 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:
title
Returns title of the videoviews
Returns view count of the videolikes
Returns total likes on the videodislikes
Returns total dislikes on the videoparent
Returns channel id from which the video belongduration
Returns duration of the videouploaded
Returns date of upload of the videourl
Returns url of the videothumbnail
Returns HQ Thumbnail of the videotags
Returns list of tags of the video
-
-
Create an instance of Playlist Data:
-
playlist = Playlist("playlist_id")
-
Attributes:
-
info
Returns 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:
name
Returns the name of the playlist or Noneurl
Returns the URL of the playlist or Nonevideos
Returns the list of Video Objects of the videos in playlist or Nonevideo_count
Returns the video count of the playlist or Nonethumbnail
Returns the Thumbnail of the playlist or None
-
-
-
Create an instance of YouTube Extras:
-
extras = Extras()
-
Attributes:
Trending
Returns #1 Trending Video ObjectMusic
Returns fresh trending list of Music Video Objects [ Video Object ]Gaming
Returns fresh trending list of Gaming Video Objects [ Video Object ]News
Returns fresh trending list of News Video Objects [ Video Object ]Live
Returns fresh trending list of Live Video Objects [ Video Object ]Learning
Returns fresh trending list of Educational Video Objects [ Video Object ]Sports
Returns fresh trending list of Sports Video Objects [ Video Object ]
-