Skip to content

encoding-hun/pptu

Repository files navigation

builds github_release pypi_release pypi_downloads license
telegram commits open_issues closed_issues
name name



Python P2P Torrent Uploader

Requirements

  • Python 3.10 to 3.13
  • Python package dependencies (uv sync --frozen – requires uv 0.8.0 or newer – or pip install .)
  • torrenttools (for creating torrents, optional)
  • 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
Yes 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.py. 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. Optionally, you may specify img_uploader for image host site.

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

Usage: pptu [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...

Options:
   -v, --version                      Show the version and exit.
   -i, --input PATH                   Files or directories to create torrents for.
   --fast-upload / --no-fast-upload   Upload only after all steps succeed (or force-disable).
   -c, --confirm                      Ask for confirmation before uploading.
   -a, --auto                         Run non-interactively (never prompt).
   -ds, --disable-snapshots           Skip creating description snapshots.
   -s, --skip-upload                  Create torrents but don't upload.
   -n, --note TEXT                    Note to attach to the upload.
   -lt, --list-trackers               Show the list of supported trackers and exit.
   -h, --help                         Show this message and exit.

Uploaders (7):
   AvistaZ          https://avistaz.to/
   BroadcasTheNet   https://broadcasthe.net/
   CinemaZ          https://cinemaz.to/
   HDBits           https://hdbits.org/
   nCore            https://ncore.pro/
   PassThePopcorn   https://passthepopcorn.me/
   PrivateHD        https://privatehd.to/

Example

pptu -i /path/example.mkv -i /path/example2.mkv hdb nc --request-id 12356

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages