Skip to content

Lonestar1306/Torrent_TUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Torrent TUI Search

A powerful Terminal User Interface (TUI) tool to search torrents from multiple sources in parallel. Inspired by FMHY and qBittorrent search plugins.


✨ Features

  • 🔎 Multi-source torrent search (parallel scraping)

  • ⚡ Fast async requests with aiohttp

  • 🧠 Smart language detection (🇮🇹 Italian prioritized)

  • 📊 Sorting by language + seeders

  • 🎨 Beautiful terminal UI powered by textual

  • 📋 One-click magnet copy to clipboard

  • 🔗 Supports multiple sources:

    • SolidTorrents
    • TorrentsCSV
    • 1337x
    • EZTV
    • YTS
    • Nyaa
    • The Pirate Bay (via APIBay)

📸 Preview

+-------------------------------------------------------------+
| 🔍 Search: ubuntu                                           |
+-------------------------------------------------------------+
| 🇮🇹 Ubuntu 22.04 ITA       | 2.1 GB | 150 | 10 | 1337x        |
| 🇬🇧 Ubuntu Desktop         | 3.5 GB | 500 | 50 | SolidTorrents|
+-------------------------------------------------------------+

🧰 Requirements

  • Python 3.9+
  • Pip packages:
pip install textual aiohttp beautifulsoup4 rich

🚀 Installation

Clone the repository:

git clone https://github.com/yourusername/torrent-tui-search.git
cd torrent-tui-search

Install dependencies:

pip install -r requirements.txt

▶️ Usage

Run the application:

python torrent_tui.py

Controls

  • Type your search query and press Enter
  • Use arrow keys to navigate results
  • Press Enter on a result to copy magnet link
  • Press Ctrl+C or Ctrl+Q to exit

🧠 How It Works

  • Performs parallel searches across multiple torrent indexers

  • Automatically adds an "ita" query variant for better localization

  • Deduplicates results using magnet links

  • Applies a language scoring system:

    • 🇮🇹 Italian → highest priority
    • 🇬🇧 English/Multi → medium
    • Others → lowest
  • Sorts results by:

    1. Language score
    2. Seeders count

🧩 Architecture

  • TorrentResult → data model

  • Async scrapers:

    • API-based (SolidTorrents, TorrentsCSV, YTS)
    • HTML scraping (1337x, EZTV, Nyaa)
  • Textual App → UI rendering and interaction


⚠️ Disclaimer

This project is for educational purposes only. The developer is not responsible for how this software is used.

Make sure to respect your local laws and regulations regarding torrent usage.


💡 Future Improvements

  • Add more indexers
  • Add category filters
  • Download integration (qBittorrent / Transmission)
  • Config file support
  • Sorting/filter UI

🤝 Contributing

Pull requests are welcome! If you want to add new sources or improve performance, feel free to contribute.


⭐ Support

If you like this project:

  • ⭐ Star the repo
  • 🐛 Report issues
  • 🔧 Contribute improvements

📜 License

MIT License

About

A powerful Terminal User Interface (TUI) tool to search torrents from multiple sources in parallel. Inspired by FMHY and qBittorrent search plugins.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages