go-torrent-go

command module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2025 License: MIT Imports: 9 Imported by: 0

README ΒΆ

Go Torrent Go

A concurrent torrent search engine that aggregates results from multiple torrent sites.

πŸ› οΈ Initial Setup Required

You must configure configs/scrapers.json before first use - the template contains placeholder URLs that need replacement with current working domains.

Features

  • Multi-site search: Simultaneously queries 1337x, RARBG, NyaaSI, and Torrent9
  • Advanced filtering: Filter by language, seeders count, and quality
  • Magnet links: Automatic retrieval of magnet links for top results
  • JSON API: Ready for integration with other applications
  • Configurable: External configuration for sites and domains

Installation

git clone https://github.com/cterlecki/go-torrent-go.git
cd go-torrent-go
go build -o go-torrent-go main.go

Configuration

Edit configs/scrapers.json (replace all placeholder values):

{
  "sites": {
    "1337x": {
      "base_url": "https://www.url.domain",
      "search_path": "/search/{query}/1/",
      "domains": ["url.domain", "www.url.domain"]
    },
    "rarbg": {
      "base_url": "https://www.url.domain",
      "search_path": "/search/?search={query}",
      "domains": ["url.domain", "www.url.domain"]
    },
  }
}

Usage

# Basic search (terminal output)
./go-torrent-go -q "Interstellar"

# JSON output with English results and magnets
./go-torrent-go -q "Dune" -lang english -m -limit 5 -o json

Available Flags

Flag	Description	Example
-q	Search query	-q "Inception"
-o	Output format	-o json
-m	Fetch magnets	-m
-limit	Result limit	-limit 10
-lang	Language filter	-lang french

Project Structure


internal/
β”œβ”€β”€ configs/
    └── scrapers.json       # Site configurations (REQUIRED SETUP)
β”œβ”€β”€ core/                   # Search logic
β”œβ”€β”€ models/                 # Data structures
└── scrapers/               # Site implementations
    β”œβ”€β”€ x1337.go
    β”œβ”€β”€ rarbg.go
    └── torrent9.go

License MIT License - See LICENSE for details.

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
internal
pkg
api

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL