Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automated Shorts Reposting Engine

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.


⚡ What It Does (Core Architecture)

  • 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-dlp paired 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 FFmpeg and immediately pushes the rendered .mp4 to 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.

🛠️ Prerequisites

To deploy this node, your host environment must have the following installed:

  • Python 3.10+
  • Node.js: Required to solve YouTube's JavaScript n-challenge encryptions.
  • FFmpeg: Required to stitch high-quality separated audio and video streams together.

⚙️ Installation & Setup Guide

Phase 1: Environment Preparation

  1. Install System Dependencies (Linux/Codespaces/Ubuntu):

    sudo apt-get update && sudo apt-get install -y nodejs ffmpeg
  2. 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]"

Phase 2: The Credential Vault

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.

  1. .env File: Create a file named .env and 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
  2. 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.
  3. 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.txt and place it in the root directory.

Phase 3: Initial Authentication & Launch

  1. 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.json file, allowing the bot to stay authenticated forever.

  2. 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.


🎛️ Using the Dashboard

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.


Disclaimer

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.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages