/pptu

Primary LanguagePythonMIT LicenseMIT

builds github_release pypi_release pypi_downloads license
telegram commits open_issues closed_issues
name name



Python P2P Torrent Uploader

Requirements

  • Python 3.10+
  • Python package dependencies (poetry install – requires poetry 1.2.0 or newer – or pip install .)
  • torrenttools (for creating torrents)
  • MediaInfo CLI (for generating tech info)
  • FFmpeg (for generating snapshots)
  • ImageMagick/libmagickwand (for optimizing snapshots)

Supported trackers

Name Acronym Auth Cloudflare Captcha Server upload allowed
General
BroadcasTheNet BTN Credentials/
Cookies
No No Dedicated servers only, requires staff approval
HDBits HDB Credentials/
Cookies
No Simple Yes, if IP whitelisted in profile or 2FA enabled
nCore nC Credentials/
Cookies
No No Yes
PassThePopcorn PTP Credentials/
Cookies
No No Dedicated servers only, requires staff approval
AvistaZ Network
AvistaZ AvZ Credentials/
Cookies
No Yes Yes, if IP whitelisted in profile
CinemaZ CZ
PrivateHD PHD

For sites with captcha, a 2captcha API key is required to solve the captcha. Manual solving may be added in the future. "Simple" captchas can be solved automatically without 2captcha or user interaction.

PassThePopcorn

  • Credential auth requires passkey in addition to username and password.

AvistaZ Network

  • Using credential auth is strongly recommended as cookies always expire within a few days.

Installation

Install dependencies and the script with ./install.sh. You can re-run the script to update after a git pull.

Setup

Copy config.example.toml to ~/.config/pptu/config.toml and edit it as appropriate.

For credential-based auth, add your credentials in ~/.config/pptu/config.toml:

[TRACKER]
username = "yourusername"
password = "yourpassword"

Optionally, you may specify totp_secret for automating 2FA logins.

For cookie-based auth, place cookies in ~/.local/share/pptu/cookies/TRACKER.txt.

TRACKER is the name or the abbreviation of the tracker above (all lowercase).

Usage

❯ pptu -h
pptu 2024.06.22

USAGE: pptu [-h] [-v] [-t ABBREV] [-f] [-nf] [-c] [-a] [-ds] [-s] [-n NOTE] [-lt]

POSITIONAL ARGUMENTS:
  path                      files/directories to create torrents for

FLAGS:
  -h, --help                show this help message and exit
  -v, --version             show version and exit
  -t, --trackers ABBREV     tracker(s) to upload torrents to (required)
  -f, --fast-upload         only upload when every step is done for every input
  -nf, --no-fast-upload     disable fast upload even if enabled in config
  -c, --confirm             ask for confirmation before uploading
  -a, --auto                never prompt for user input
  -ds, --disable-snapshots  disable creating snapshots to description
  -s, --skip-upload         skip upload
  -n, --note NOTE           note to add to upload
  -lt, --list-trackers      list supported trackers