Socket
Socket
Sign inDemoInstall

pytubelib

Package Overview
Dependencies
4
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pytubelib

PyTubeLib is a tool for interacting with the YouTube Data v3 API using Python. With PyTubeLib, you can search for channels and videos using keywords, get details about specific channels and videos, and search for the latest videos from a channel. The class is designed to handle common API errors and returns results in JSON format for easy processing.


Maintainers
1

Readme

PyTubeLib

Installation

pip install pytubelib

Usage

from pytubelib import YTAPI

# Load credentials from a JSON file
creds_file = '/path/to/credentials.json'

# Create an instance of the YTAPI class
yt = YTAPI(creds_file)

# Search for channels by keyword
channels = yt.search_channels('xXBlackDev9010Xx')

# Get details for the first channel in the list
channel_id = channels[0]
channel_details = yt.get_channel_details(channel_id)

# Search for videos in the channel by keyword
videos = yt.search_new_videos(channel_id, 'tutorial')

# Get details for the first video in the list
video_id = videos[0]['id']['videoId']
video_details = yt.get_video_details(video_id)

FAQs


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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc