This repository provides a minimal Flask-based API for downloading videos or audio from platforms like YouTube and TikTok. It is designed to work seamlessly with iOS Shortcuts and is especially well-suited for home server setups.
This tool allows users to send a POST request from iOS Shortcuts to a local or remote server. The server processes the request using yt-dlp, downloads the desired media in the requested format, and returns a temporary download URL.
Use the following link to integrate with your iOS Shortcuts:
Running this project on a home server (e.g., Raspberry Pi, macOS, or Windows machine) is highly recommended:
- No need for cookies
- No IP bans from YouTube
- Private, local access from iOS devices
- Compatible with tools like DuckDNS or ZeroTier for remote access
If deployed on a public VPS, you may experience issues such as:
- YouTube blocking public IPs
- CAPTCHA requirements
- Frequent expiration of cookies
To mitigate this, use a cookies.txt file extracted from a logged-in browser session. However, note that cookies often become invalid after a few requests when using public IPs.
- Python 3.7+
yt-dlpffmpeg- Optional:
cookies.txtfor VPS use
git clone https://github.com/unveroleone/ClipFetch.git
cd ClipFetch
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtTo run the server:
python server.pyThe API will be available at:
http://<your-ip>:5000/download
ClipFetch/
├── server.py # Main Flask app
├── requirements.txt # Python dependencies
├── cookies.txt # Optional: YouTube login cookies for VPS
└── yt-downloads/ # Temporary storage for downloaded files
This project does not implement authentication. If exposed to the internet, it is strongly recommended to:
- Restrict access via firewall or IP whitelisting
- Use it behind a VPN or within a private network
- Avoid exposing it to unknown users
Contributions are welcome! If you have ideas for improvements or encounter any issues, feel free to:
- Fork the repository and submit a pull request.
- Create an issue on GitHub to report bugs or suggest features.
Your feedback helps make this project better for everyone!