Metadata-Version: 2.3
Name: bt1337xearch
Version: 0.4.1
Summary: Better search for 1337x[.]to with basic filters
Author: SimoneFelici
Author-email: SimoneFelici <felicisimone9@gmail.com>
Requires-Dist: scrapling[fetchers]>=0.5.1
Requires-Dist: textual>=8.2.8
Requires-Python: >=3.14
Description-Content-Type: text/markdown

# **bt1337xearch**

1337x search TUI with Cloudflare bypass and basic filtering

## What it does

**bt1337xearch** is a command-line tool that searches 1337x torrents with:
- Category filtering (Movies, TV, Games, etc.)
- Sorting options (by time, size, seeders, leechers)
- Keyword filtering (include/exclude keywords)

## Installation

```bash
uv tool install bt1337xearch
uvx --refresh --with bt1337xearch playwright install chromium
```
or install from source:

```bash
git clone https://github.com/SimoneFelici/bt1337xearch.git
cd bt1337xearch
uv tool install .
uvx --refresh --with . playwright install chromium
```

## Update

```bash
uv tool upgrade bt1337xearch
uvx --refresh --with bt1337xearch playwright install chromium
```
or, if installed from source:

```bash
cd bt1337xearch
git pull
uv tool install --reinstall .
uvx --refresh --with . playwright install chromium
```

## Usage

> [!TIP]
> Use "ctrl + p" to display the TUI keybindings!

### Basic search

```bash
bt1337xearch -n "Dexter"
```

### Search with category (Recommended)

```bash
bt1337xearch -n "Lupin" -c ANIME
```

### Search with sorting

```bash
bt1337xearch -n "Alien" -c MOVIE -s TIME -o DESC
```

### Advanced filtering

Use `+` to include words and `~` to exclude words:
```bash
# Include only results with "1080p" or "BluRay"
bt1337xearch -n "Dexter" -f +1080p +BluRay

# Exclude results with "CAM" or "TS"
bt1337xearch -n "Movie" -f ~CAM ~TS

# Combine include and exclude
bt1337xearch -n "Dexter" -c TV -f +1080p "~x265 HEVC" ~CAM
```

## Options

| Option | Description | Choices |
|--------|-------------|---------|
| `-n, --name` | Name of the media (required) | - |
| `-c, --category` | Filter by category | MOVIE, TV, GAME, MUSIC, APP, DOCU, ANIME, OTHER, XXX |
| `-s, --sort` | Sort results by | TIME, SIZE, SEED, LEECH |
| `-o, --order` | Sort order (default: DESC) | ASC, DESC |
| `-f, --filter` | Filter by keywords | Use `+word` to include, `~word` to exclude |
| `--match-all` | The '+' filter works with "AND" and not "OR" |

## Examples

```bash
# Search for Dexter TV series, sorted by seeders
bt1337xearch -n Dexter -c TV -s SEED

# Search for movies with "1080p", exclude "CAM" releases
bt1337xearch -n "Angel's Egg" -c MOVIE -s TIME -o DESC -f +1080p '~CAM'

# Search for games, sorted by upload time
bt1337xearch -n "Peak" -c GAME -s TIME -o ASC
```

## Output

For each result, the tool displays:
- Name
- Link
- Seeders
- Leechers
- Upload date
- File size
- Uploader

<img width="1920" height="1119" alt="image" src="https://github.com/user-attachments/assets/0174586f-5a31-4a42-a7fb-b378257a2fd3" />
