“Simple Python script to get notified about the latest YouTube video from any specific channel that you prefer on Discord!”
Go to the Google Cloud Console.
Create a new project (or select an existing one).
Enable the YouTube Data API v3 for your project.
Create API credentials (API key).
Open your Discord server.
Go to Server Settings > Integrations > Webhooks.
Click “New Webhook” and customize it as you like.
Copy the Webhook URL.
Install Python: Make sure Python is installed on your system. You can download it from the official Python website.
Install Required Libraries: You’ll need the ‘requests’ library to make HTTP requests. You can install it using pip:
pip install requests
Create the Python Script
Create a New File: Open your favorite text editor or an Integrated Development Environment (IDE) like VS Code, PyCharm, or any other.
Save the Script: Copy the provided script and save it as yt-vid-notifier.py
Replace Placeholder Values
Open the yt-vid-notifier.py
file and replace
YOUR_YOUTUBE_API_KEY
, TARGET_CHANNEL_ID
, and
YOUR_DISCORD_WEBHOOK_URL
crontab -e
0 */8 * * * /usr/bin/python /home/samsep10l/Desktop/yt-vid-notifier.py
crontab -l