Interactive terminal movie downloader powered by the YTS API. It supports local torrent clients, remote qBittorrent, and clipboard export with a clean Rich-based UI.
yts-dl is a Python CLI app for searching and selecting movies from YTS, then sending the magnet link to your preferred destination:
- Local torrent client (macOS/Linux/Windows)
- Remote qBittorrent (homelab/server)
- Clipboard (copy magnet link)
- Interactive main menu with guided prompts
- Movie discovery commands:
searchby titletopby ratingtrendingby latest additions
- Torrent quality picker (720p, 1080p, 1080p.x265, 2160p, 3D)
- Global behavior overrides:
--local,--remote,--quality - Remote setup wizard with qBittorrent connection test
- Error handling for API/network failures with retry prompts
- Python 3.10+
- Dependencies:
clickrichrequeststomllib(builtin on Python 3.11+) ortomlifallback
Run directly without installation:
python main.pyOr install in editable mode:
python -m pip install -e .Then use:
yts-dlIf your shell cannot find the command, run it from your virtual environment:
.venv/bin/yts-dlConfig file location:
~/.config/yts-dl/config.toml
Example:
[local]
default_mode = "local" # "local" or "remote"
[remote]
host = "http://192.168.1.x:8080"
username = "admin"
password = ""
save_path = "/mnt/storage/movies"Setup wizard:
yts-dl config setupShow current configuration:
yts-dl config showRemote example (qBittorrent-nox):
If you run qBittorrent in headless mode (qbittorrent-nox), Web UI usually listens on port 8080.
- Example host:
http://192.168.1.20:8080 - Login endpoint used by this app:
/api/v2/auth/login - Add torrent endpoint used by this app:
/api/v2/torrents/add
Typical setup flow:
- Install and run
qbittorrent-noxon your server. - Enable Web UI and set username/password.
- Make sure port
8080is reachable from your machine. - Set
host,username,password, andsave_pathinconfig.toml(or useyts-dl config setup).
Main interactive menu:
yts-dlCommands:
yts-dl search [QUERY]
yts-dl top [--genre GENRE] [--min-rating FLOAT] [--quality QUALITY]
yts-dl trending [--quality QUALITY]
yts-dl config setup
yts-dl config showGlobal flags:
--remote # force remote qBittorrent destination
--local # force local torrent client destination
--quality # 720p | 1080p | 1080p.x265 | 2160p | 3D
--save-path PATH # override save directory on remote serverExamples:
yts-dl search inception --quality 1080p --remote
yts-dl top --genre action --min-rating 7.5
yts-dl trending --localyts-dl/
├── main.py # CLI entrypoint and interactive flows
├── api.py # YTS API integration
├── qbit.py # qBittorrent Web API client
├── config.py # Config load/save and setup wizard
├── ui.py # Rich UI helpers (tables, panels, spinner)
├── utils.py # Magnet builder, local open, clipboard helpers
├── requirements.txt
└── pyproject.toml
- If
--remoteis used and config does not exist yet, setup wizard is prompted. - If remote qBittorrent is unreachable, the app can offer a local fallback.
- If clipboard tools are unavailable, magnet link is printed as fallback.
- Press
Ctrl+Canytime to exit safely.
command not found: yts-dl- Activate your environment or run
.venv/bin/yts-dl.
- Activate your environment or run
- qBittorrent connection failure
- Verify host URL, credentials, port, and network access.
- No search results
- Try broader keywords or remove quality constraints.
Use this software responsibly and in compliance with applicable laws in your region. You are solely responsible for the content you access or download.
yts-dl adalah aplikasi CLI Python untuk mencari film dari YTS lalu mengirim magnet link ke tujuan yang diinginkan:
- Torrent client lokal (macOS/Linux/Windows)
- qBittorrent remote (homelab/server)
- Clipboard (salin magnet link)
- Menu interaktif utama dengan prompt terarah
- Perintah pencarian film:
searchberdasarkan judultopberdasarkan ratingtrendingberdasarkan film terbaru
- Pemilih kualitas torrent (720p, 1080p, 1080p.x265, 2160p, 3D)
- Override perilaku global:
--local,--remote,--quality - Setup wizard remote dengan tes koneksi qBittorrent
- Penanganan error API/jaringan dengan opsi retry
- Python 3.10+
- Dependensi:
clickrichrequeststomllib(builtin Python 3.11+) atau fallbacktomli
Jalankan langsung tanpa instalasi package:
python main.pyAtau install editable (disarankan untuk development):
python -m pip install -e .Lalu jalankan:
yts-dlJika command tidak ditemukan oleh shell, jalankan dari virtualenv:
.venv/bin/yts-dlLokasi file konfigurasi:
~/.config/yts-dl/config.toml
Contoh:
[local]
default_mode = "local" # "local" atau "remote"
[remote]
host = "http://192.168.1.x:8080"
username = "admin"
password = ""
save_path = "/mnt/storage/movies"Setup wizard:
yts-dl config setupTampilkan konfigurasi aktif:
yts-dl config showContoh remote (qBittorrent-nox):
Jika Anda menjalankan qBittorrent mode headless (qbittorrent-nox), biasanya Web UI aktif di port 8080.
- Contoh host:
http://192.168.1.20:8080 - Endpoint login yang dipakai aplikasi ini:
/api/v2/auth/login - Endpoint tambah torrent yang dipakai aplikasi ini:
/api/v2/torrents/add
Alur setup yang umum:
- Install dan jalankan
qbittorrent-noxdi server. - Aktifkan Web UI lalu atur username/password.
- Pastikan port
8080bisa diakses dari mesin Anda. - Isi
host,username,password, dansave_pathdiconfig.toml(atau pakaiyts-dl config setup).
Menu interaktif utama:
yts-dlPerintah:
yts-dl search [QUERY]
yts-dl top [--genre GENRE] [--min-rating FLOAT] [--quality QUALITY]
yts-dl trending [--quality QUALITY]
yts-dl config setup
yts-dl config showFlag global:
--remote # paksa tujuan remote qBittorrent
--local # paksa tujuan torrent client lokal
--quality # 720p | 1080p | 1080p.x265 | 2160p | 3D
--save-path PATH # override direktori simpan di server remoteContoh:
yts-dl search inception --quality 1080p --remote
yts-dl top --genre action --min-rating 7.5
yts-dl trending --localyts-dl/
├── main.py # Entry point CLI dan alur interaktif
├── api.py # Integrasi YTS API
├── qbit.py # Client qBittorrent Web API
├── config.py # Load/save config dan setup wizard
├── ui.py # Helper Rich (table, panel, spinner)
├── utils.py # Builder magnet, buka lokal, helper clipboard
├── requirements.txt
└── pyproject.toml
- Jika
--remotedipakai dan config belum ada, setup wizard akan ditawarkan. - Jika qBittorrent remote tidak bisa dihubungi, aplikasi bisa menawarkan fallback ke lokal.
- Jika utilitas clipboard tidak tersedia, magnet link akan ditampilkan sebagai fallback.
- Tekan
Ctrl+Ckapan saja untuk keluar dengan aman.
command not found: yts-dl- Aktifkan environment atau jalankan
.venv/bin/yts-dl.
- Aktifkan environment atau jalankan
- Gagal koneksi qBittorrent
- Periksa host URL, kredensial, port, dan akses jaringan.
- Hasil pencarian kosong
- Coba kata kunci yang lebih umum atau hilangkan filter kualitas.
Gunakan aplikasi ini secara bertanggung jawab dan sesuai hukum yang berlaku di wilayah Anda. Anda bertanggung jawab penuh atas konten yang diakses atau diunduh.