Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ayv

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ayv

A python library that wraps around the YouTube V3 API. You can use it find and manage YouTube resources including Videos, Playlists, Channels and Comments.

  • 0.5.1
  • PyPI
  • Socket score

Maintainers
1

youtube-wrapper

Overview

A python library that wraps around the YouTube V3 API. You can use it find and manage YouTube resources including Videos, Playlists, Channels and Comments.

The library is modelled after Google's own documentation.

Requirements

  • Python 3.10+
  • Works on Linux, Windows, macOS, BSD

Installation

pip install ayv

Get started

To get started, you need a verified Google Account and Google API keys with the correct permissions.

How to Get A Google API Key

Follow the instructions in this short article to get an API key.

To get a particular video using the videos' id:

  1. Create an instance of the YouTube API passing in the path to the downloaded client secret file:
from youtube import YouTube

client_secrets_file = '/home/lyle/Downloads/secrets.json'
youtube = YouTube(client_secrets_file)
youtube.authenticate()
  1. Use the video id to find the video:
video = youtube.find_video_by_id('rfscVS0vtbw')
  1. To find many videos using their id's:
ids = ['rfscVS0vtbw', 'TFa38ONq5PY']
videos = youtube.find_videos(ids)
  1. To find the most popular videos in a given region e.g Kenya, pass in the region code:
popular_kenyan_videos = youtube.find_most_popular_video_by_region('ke')
  1. To search for videos (this returns an iterator):
query = 'Python programming'
video_iterator = youtube.search_video('Python')
videos = next(video_iterator)

Documentation and Tutorials

To learn more about the library including the documentation and tutorials, check out the libraries' documentation.

How to Contribute

To contribute, chack out the contribution guideline.

License

The API uses an MIT License

Developer

Lyle Okoth – @lylethedesigner on twitter

lyle okoth on medium

My email is lyceokoth@gmail.com

Here is my GitHub Profile

You can also find me on Linkedin

Keywords

FAQs


Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc