Skip to content

Easy-to-use Python library for receiving YouTube push notification for video upload and edit

License

Notifications You must be signed in to change notification settings

SeoulSKY/ytnoti

Repository files navigation

ytnoti

Easy-to-use Python library for receiving YouTube push notifications for video upload and edit
PyPI version

ytnoti is designed to help you receive YouTube push notifications for video upload and edit in an easy and efficient way.

🛠️ How it works

This library uses YouTube Data API v3 via PubSubHubbub to receive push notifications, so you can receive notifications in real time without constantly polling the YouTube API.

In addition, this method doesn't require any API key, so you can use this library without any quota limit.

💻 Installation

This library requires Python 3.11 or higher.

pip install ytnoti

📝 Simple Example

For more examples, please visit the examples folder.

from ytnoti import YouTubeNotifier, Video
from pyngrok import ngrok

# Create your ngrok token free from https://dashboard.ngrok.com/get-started/setup
ngrok.set_auth_token("Your ngrok token here")

notifier = YouTubeNotifier()


@notifier.upload()
async def listener(video: Video):
    print(f"New video from {video.channel.name}: {video.title}")


notifier.subscribe("UC9EEyg7QBL-stRX-7hTV3ng")  # Channel ID of SpeedyStyle
notifier.run()

📚 Documentation

Please read the documentation before asking questions. Your question may already be answered there.

👥 Community

If you are having any problems with using this library, please feel free to ask for help in the issues section or on my Discord server.

discord invite

📄 License

This project is licensed under the MIT License - see the LICENSE.md file for details.