Pytubedata is a simple wrapper for YouTube Data API written in python
pip install pytubedata
This package requies a valid YT Data API Key. You can get one from Google Cloud Console.
-
Create a file in
secret.yml
in the project's root directory and save the YouTube Data API key in that file. -
Getting the
Client
from Youtube import Client c= Client()
-
Search for videos
c.search(query="api")
check out
Youtube/client.py
for other parameters -
Get activities of a channel
c.request("activity",id="channel_id")
-
Get details of a channel
c.request("channel",id="channel_id")
-
Get sections of a channel
c.request("channel_sections",id="channel_id")
-
Get section of a channel by id
c.request("channel_section_by_id",id="section_id")
-
Get playlists of a channel
c.request("playlists",id="channel_id")
-
Get playlist by id
c.request("playlist_by_id",id="playlist_id")
-
Get videos of a playlist
c.request("playlist_videos",id="playlist_id")
-
Get details of a video by id
c.request("video_by_id",id="video_id")
-
Get comments on a video
c.request("comments_on_video",id="video_id")
-
Get comment details by id
c.request("comment_by_id",id="comment_id")
-
Get replies of a comment
c.request("replies_to_comment",id="comment_id")
Mail: keshavandteam@gmail.com