This project is a YouTube notification service that monitors a specified YouTube channel for new video uploads and sends notifications via a webhook.
- Monitors a YouTube channel for new video uploads.
- Sends notifications via a webhook when a new video is detected.
- Maintains a history of notifications to avoid duplicate alerts.
- Configurable check interval and video title pattern matching.
- Docker
- Docker Compose
YOUTUBE_CHANNEL_ID
: The ID of the YouTube channel to monitor.WEBHOOK_URL
: The URL of the webhook to send notifications to.CHECK_INTERVAL
: The interval (in minutes) at which to check for new videos. Default is 5 minutes.VIDEO_TITLE
: The default title pattern to match for new videos.
- Clone the repository:
git clone https://github.com/yourusername/youtube-notification-service.git
cd youtube-notification-service
- Create a
.env
file in the root directory and add the required environment variables:
YOUTUBE_CHANNEL_ID=your_channel_id
WEBHOOK_URL=your_webhook_url
CHECK_INTERVAL=15
VIDEO_TITLE="Your Video Title"
- Build and run the service using Docker Compose:
docker-compose up --build
app.py
: Main application script that monitors the YouTube channel and sends notifications.match.py
: Contains the logic for matching video titles.logger.py
: Configures the logging for the application.notification-history.json
: Stores the history of notifications to avoid duplicates.Dockerfile
: Dockerfile to build the application image.docker-compose.yml
: Docker Compose configuration file.
The service will start monitoring the specified YouTube channel and send notifications to the configured webhook URL. Logs will be output to the console.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request.
For any questions or issues, please open an issue on the GitHub repository.