Skip to main content

Grabber

Utilities to extract media from supported sources and publish to Telegram/Telegraph.

Quick Start

  1. Install dependencies:
uv sync --dev
  1. Configure environment in .env (at minimum):
  • BOT_TOKEN
  • TELEGRAPH_TOKEN
  • SHORT_NAME
  • AUTHOR_NAME
  • AUTHOR_URL
  1. Show supported entities:
uv run grabber -a

Run (CLI)

Example:

uv run grabber --publish --channel @your_channel --sources "https://example.com/post"

Send plain text to a channel:

uv run grabber --channel @your_channel --text "Some text"

Print unread Picazor album notification URLs:

uv run grabber --notifications picazor --number 10

Print profile URLs for the first unread Picazor album notifications scanned:

uv run grabber --notifications picazor --number 10 --profiles

Print Fapello feed image URLs:

uv run grabber --notifications fapello --number 10

Print unique Fapello profile URLs from the feed:

uv run grabber --notifications fapello --number 10 --profile

Search Fapello models:

uv run grabber --search fapello --query peachyxeena

Fapello notification/search modes and Picazor notification mode need these .env values from authenticated browser sessions:

FAPELLO_USER_ID=
FAPELLO_HASH=
PICAZOR_SESSION_TOKEN=
PICAZOR_CF_CLEARANCE=
PICAZOR_CSRF_TOKEN=
PICAZOR_LOCALE=en

Post text into a thread (discussion group):

uv run grabber --channel @your_channel --thread-id 123 --text "Some text in thread"

If --thread-id is omitted, grabber prints the resolved thread id so you can reuse it:

uv run grabber --channel @your_channel --text "Some text"

Output:

Text sent to @your_channel
Resolved thread id for reuse: --thread-id 123

Run Interactive Bot

uv run python -m grabber.core.bot.interactive_bot

Then use /post, select channel, and send source URLs.

Run Web UI

The web interface is served in two services:

  • web-api: FastAPI backend (session-protected endpoints)
  • web-ui: React dashboard

Setup

  1. Add web environment variables:
WEB_UI_PASSWORD=your-strong-password
WEB_SESSION_SECRET=a-long-random-string
WEB_SESSION_TTL_SECONDS=86400
  1. Start the stack:
docker compose up --build web-api web-ui
  1. Open http://<your-vps-ip>:8888 (or map another public port in docker-compose.yml).

  2. Log in with WEB_UI_PASSWORD. After login:

  • Enter one or more URLs and target channel
  • Optionally enable tag mode/video mode
  • Send plain text by checking Post text only
  • Optionally provide a thread id (--thread-id) for text replies/comments

Notes:

  • The channel list is pulled from the existing bot CHANNELS mapping (src/grabber/core/settings.py).
  • Entity list comes from QUERY_MAPPING.
  • API routes are exposed under /api/* and proxied by the UI.

Pornhub Video-to-Channel

Single-video Pornhub URLs are supported for direct Telegram delivery.

Requirements

  • A target channel is mandatory (--channel in CLI or bot channel picker).
  • yt_dlp must be available in the runtime environment.
  • PORNHUB_COOKIES_FILE_PATH must point to a valid Netscape-format cookies file.

Add to .env:

PORNHUB_COOKIES_FILE_PATH=/absolute/path/to/pornhub_cookies.txt

Supported Pornhub hosts

  • pornhub.com
  • www.pornhub.com
  • m.pornhub.com

CLI example

uv run grabber \
  --publish \
  --channel -1003835153909 \
  --sources "https://www.pornhub.com/view_video.php?viewkey=ph5abc123"

Note: CLI --channel must be a Telegram username/ID (for example @channel_name or -100...), not the interactive bot display label.

Delivery behavior

  • Chooses the best format expected to fit Telegram Bot API upload limits (<= 50MB).
  • If the selected media is oversized, it sends a link message fallback to the channel.
  • If --channel is missing, Pornhub execution fails fast with an explicit error.
  • If PORNHUB_COOKIES_FILE_PATH is missing/invalid, execution fails fast.
  • Checkpoint dedupe is applied, and successful sends are committed.

Troubleshooting

  • PORNHUB_COOKIES_FILE_PATH is required...
    • Set PORNHUB_COOKIES_FILE_PATH in .env.
  • ...does not exist or is not a file
    • Fix the path and permissions for the cookies file.
  • yt_dlp is required to process Pornhub sources
    • Install dependencies in the same runtime where grabber executes.
  • ERROR: [PornHub] ... Unable to extract title
    • The adapter now auto-falls back to HTML media parsing when yt_dlp metadata extraction fails.
    • If it still fails, refresh/export cookies again and update yt-dlp in your runtime.
  • Oversized media warnings
    • Expected behavior; the source falls back to link delivery.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grabberlib2-0.34.6.tar.gz (174.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

grabberlib2-0.34.6-py3-none-any.whl (360.1 kB view details)

Uploaded Python 3

File details

Details for the file grabberlib2-0.34.6.tar.gz.

File metadata

  • Download URL: grabberlib2-0.34.6.tar.gz
  • Upload date:
  • Size: 174.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for grabberlib2-0.34.6.tar.gz
Algorithm Hash digest
SHA256 a78a4b6d20b7dd9b827c5210c23d1c31ec62c7e648a48a01ef9ea11dd4e8123d
MD5 97a6c9c1836c74856e8a72829da5830e
BLAKE2b-256 c3b4658cd95e213dcc7f15ed98cd1b6a6119fed8c090129956f6e08d2777fa0d

See more details on using hashes here.

File details

Details for the file grabberlib2-0.34.6-py3-none-any.whl.

File metadata

  • Download URL: grabberlib2-0.34.6-py3-none-any.whl
  • Upload date:
  • Size: 360.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for grabberlib2-0.34.6-py3-none-any.whl
Algorithm Hash digest
SHA256 db0188567536195d4aced30f568815cf0a569c9726c15c8d6f68c04eab4ac645
MD5 a5bead1c4fa975cfe1f20a05b6b526f0
BLAKE2b-256 40facc7bd37fec5219f68a0db41d88b0dbc253375c1756013a656e607bb37dda

See more details on using hashes here.

Release history Release notifications | RSS feed

0.36.9

2 files

0.36.8

2 files

0.36.7

2 files

0.36.6

2 files

0.36.5

2 files

0.36.4

2 files

0.36.3

2 files

0.36.2

2 files

0.36.1

2 files

0.36.0

2 files

0.35.2

2 files

0.35.1

2 files

0.34.9

2 files

0.34.8

2 files

0.34.7

2 files

This release

0.34.6 This release

2 files

0.34.5

2 files

0.34.4

2 files

0.34.3

2 files

0.34.2

2 files

0.34.1

2 files

0.34.0

2 files

0.33.0

2 files

0.32.0

2 files

0.31.0

2 files

0.30.0

2 files

0.29.7

2 files

0.29.4

2 files

0.29.3

2 files

0.29.2

2 files

0.29.1

2 files

0.29.0

2 files

0.27.8

2 files

0.27.7

2 files

0.27.6

2 files

0.27.5

2 files

0.27.4

2 files

0.27.3

2 files

0.27.2

2 files

0.27.1

2 files

0.27.0

2 files

0.26.8

2 files

0.26.7

2 files

0.26.6

2 files

0.26.5

2 files

0.26.4

2 files

0.26.3

2 files

0.26.1

2 files

0.26.0

2 files

0.25.2

2 files

0.25.1

2 files

0.25.0

2 files

0.24.0

2 files

0.23.9

2 files

0.23.8

2 files

0.23.7

2 files

0.23.6

2 files

0.23.4

2 files

0.23.3

2 files

0.23.1

2 files

0.22.1

2 files

0.20.4

2 files

0.20.3

2 files

0.20.2

2 files

0.20.1

2 files

0.19.4

2 files

0.18.1

2 files

0.18.0

2 files

0.17.12

2 files

0.17.11

2 files

0.17.10

2 files

0.17.8

2 files

0.17.7

2 files

0.17.0

2 files

0.15.3

2 files

0.15.2

2 files

0.15.1

2 files

0.15.0

2 files

0.14.0

2 files

0.13.1

2 files

0.13.0

2 files

0.12.0

2 files

0.11.0

2 files

0.10.3

2 files

0.10.2

2 files

0.10.1

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

1 file

0.3.1

2 files

0.3.0

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.25

2 files

0.1.24

2 files

0.1.23

2 files

0.1.22

2 files

0.1.21

2 files

0.1.20

2 files

0.1.19

2 files

0.1.18

2 files

0.1.17

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page