Dominate the attention economy on autopilot.
The Automated Shorts Reposting Engine is a headless, fully autonomous YouTube monitoring node controlled entirely through a custom Discord interface. Built to run 24/7, it silently watches target channels, bypasses modern bot-walls, extracts new short-form assets, and vaults them directly into Google Drive—leaving zero footprint on local servers.
Designed for content curators and automation enthusiasts, this tool acts as a centralized command station for digital asset management.
- Autonomous Monitoring: Scans targeted YouTube channels at set intervals, identifying newly dropped Shorts (≤ 65 seconds) while ignoring older backlog content.
- Military-Grade Extraction: Utilizes
yt-dlppaired with an EJS Node.js challenge solver, Android/TV client spoofing, and authenticated session cookies to reliably punch through YouTube's strict data center bot-walls. - Direct-to-Vault Pipeline: Stitches raw high-definition video and audio streams using
FFmpegand immediately pushes the rendered.mp4to Google Drive via OAuth 2.0 user authentication. - Zero Local Footprint: Strictly obliterates local media files the millisecond a Drive upload is confirmed. Designed to run flawlessly on 512MB free-tier cloud hosting without ever hitting disk limits.
- Discord Command Center: The entire pipeline is controlled asynchronously via a sleek, dark-themed Discord UI, allowing you to force scans, check memory allocation, pause the engine, and export database backups natively from your server.
To deploy this node, your host environment must have the following installed:
- Python 3.10+
- Node.js: Required to solve YouTube's JavaScript
n-challengeencryptions. - FFmpeg: Required to stitch high-quality separated audio and video streams together.
-
Install System Dependencies (Linux/Codespaces/Ubuntu):
sudo apt-get update && sudo apt-get install -y nodejs ffmpeg -
Install Python Libraries:
pip install -r requirements.txt
CRITICAL: Ensure the external JS solver for yt-dlp is installed by running:
pip install -U "yt-dlp[default]"
You need to gather specific credentials and place them within the root directory of this project. Always ensure these files are added to your .gitignore before committing anything to a repository.
-
.envFile: Create a file named.envand configure your keys:DISCORD_TOKEN=your_discord_bot_token YOUTUBE_API_KEY=your_google_cloud_youtube_api_key DRIVE_FOLDER_ID=your_google_drive_target_folder_id TARGET_CHANNEL_ID=the_youtube_channel_id_starting_with_UC
-
Google Drive Credentials (
client_secret.json):- Go to the Google Cloud Console.
- Enable the Google Drive API.
- Create OAuth 2.0 Client IDs (Application Type: Desktop app).
- Download the JSON file, rename it to
client_secret.json, and place it in the root directory.
-
YouTube Session Cookies (
cookies.txt):- Install a "Get cookies.txt LOCALLY" extension on your browser.
- Go to YouTube, log into an alt/burner account, and export the Netscape-formatted cookies.
- Rename the downloaded file to
cookies.txtand place it in the root directory.
-
Authenticate Google Drive (First Run Only): Run the local authentication script to grant the engine access to your Drive quota.
python auth.py
Follow the URL provided in the terminal, sign in with your designated Google account, and grant permission. This will generate a
token.jsonfile, allowing the bot to stay authenticated forever. -
Launch the Engine:
python main.py
Upon startup, the engine will instantly sync the target channel's existing backlog to memory to avoid downloading old videos. It will then boot the keep-alive web server and bring the Discord UI online.
Once the bot is online in your Discord server, type the following slash command to summon the dashboard:
/status
You can use the interactive buttons to manually trigger a scan, pause the background monitor, refresh the server's RAM usage stats, or download a backup of the engine's memory cache.
This tool is engineered for educational purposes, personal workflow automation, and data pipeline management. Automatically downloading YouTube content may violate their Terms of Service. Always operate responsibly and ensure you have the rights to manage the content you are processing.