002533044aa5689137d509d091f1f452bee17162
Patreon Downloader
Lightweight helpers for using yt-dlp to download media from Patreon posts you have access to.
Contents
with_ui.py+frontend.html— browser-based UI for inspecting post metadata and streaming downloads.batch.py— command-line batch downloader (supportsurls.json).urls.sample.json— example JSON input file.
Features
- Inspect available formats and metadata before downloading.
- Stream
yt-dlpoutput to the browser with live progress. - Batch-mode support for many posts via a JSON file or inline list.
Requirements
- Python 3.8+ and
pip. yt-dlpinstalled and available on PATH (or configure via environment variables).
Installation
- Clone the repository:
git clone <repo-url>
cd patreon-downloader
- Install dependencies:
pip install -r requirements.txt
- Export your Patreon cookies to
cookies.txt(use a browser extension such as “Get cookies.txt”) and place it in the project root.
Quick Start
Web UI (recommended)
- Start the UI server:
python with_ui.py
- Open http://localhost:5000 in your browser.
- Fill in the post URL and the path to
cookies.txt. Inspect formats and click download. The terminal-like pane showsyt-dlpoutput live.
Batch mode
You can provide URLs in two ways:
- Inline in
batch.py: edit theURLSlist. - JSON file: create
urls.json(or setURLS_JSON) containing an array of URLs.
Example urls.json format (see urls.sample.json):
["https://www.patreon.com/posts/example-post-12345678", "https://www.patreon.com/posts/another-example-87654321"]
Run the batch script:
python batch.py
Configuration
YTDLP_PATH(env): overrideyt-dlpexecutable for the UI server.DOWNLOAD_DIR(env): override download directory used by the UI server.URLS_JSON(env): path to a JSON file containing an array of URLs forbatch.py(default:./urls.json).
JSON input behavior (batch)
- If
URLS_JSONexists and contains a non-empty array of strings,batch.pywill use those URLs. - If not present,
batch.pyfalls back to theURLSlist embedded in the script.
Examples
- Run single download quickly via UI.
- Use
urls.sample.jsonas a template for bulk downloads.
Troubleshooting
yt-dlpextractor or permission errors: re-exportcookies.txtand ensure they are up to date.- UI fetch timeout: the UI uses a 30s timeout for
--dump-json; run theyt-dlp --dump-jsoncommand manually to debug. - If downloads fail on Windows, ensure
YTDLPinbatch.pypoints toyt-dlp.exe.
Security & Ethics
- Use this tool only for content you are authorized to access (e.g., from subscriptions you paid for). Respect creators' terms.
Contributing
- Bug reports and pull requests welcome. Keep changes minimal and focused.
Files of interest
with_ui.py— Flask UI server and job manager.frontend.html— browser interface.batch.py— command-line batch downloader (now supports JSON input).requirements.txt— Python dependencies.urls.sample.json— example JSON file.
Browser helper
Use the included get_urls.js helper to extract post URLs from a Patreon page via the browser console. Paste and run the script in the console while viewing a page with posts; the script logs an array of URLs which you can right-click and "Copy Object" on.
License
- MIT No Attribution — see
MIT-0.txt.
Made with Claude Sonnet in about 15 Minutes.
Languages
HTML
57%
Python
40.9%
JavaScript
2.1%