Skip to content
Projets

À propos

A simple telegram bot to take screenshot of a given website and upload it to telegram

Design et médias

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

Web-Screenshot-Bot

Codacy Badge made-with-python Open Source Love svg1 Try it on telegram

A Telegram Web-Screenshot Bot Based on Playwright

Introduction

Telegram Bot that creates screenshot PNG/JPEG or PDF of a given link. Can be combined with a number of additional parameters, such as resolution, partial or full-page rendering. The bot is currently accessible through in @BetterWebShotBot.

Available Resolutions are :

  • Image [PNG/JPEG]
    • 800x600
    • 1280x720
    • 1920x1080
    • 2560x1440
  • PDF
    • Letter
    • Legal
    • A4
    • A5

Splitting of long pages are available for png and jpeg.

Installing

Note: the bot requires a Chromium browser binary to render websites.

Docker (recommended)

The bundled image already ships a matching Chromium build, so there is nothing else to install:

git clone https://github.com/alenpaulvarghese/Web-Screenshot-Bot.git
cd Web-Screenshot-Bot
cp config.env.sample config.env   # then fill in your values
docker compose up -d
docker compose logs -f

Your Telegram session is stored in a named volume (webshotbot-session), so it survives container rebuilds. Stop with docker compose down; add -v only if you want to log out and authenticate again.

Manual install

Requires Python 3.9+.

git clone https://github.com/alenpaulvarghese/Web-Screenshot-Bot.git
cd Web-Screenshot-Bot
python3 -m pip install -r requirements.txt
# Download the Chromium build that matches the pinned playwright version
playwright install chromium
# <Create config.env appropriately>
python3 __main__.py

Use playwright install chromium (not chrome) — the bot launches the browser Chromium that ships with Playwright. Installing Chrome instead can cause a version mismatch at startup.

an example config.env 👇

BOT_TOKEN=12345:49dc3eeb1aehda3cI2TesHNHc
API_ID=256123
API_HASH=eb06d4abfb49dc3eeb1aeb98ae0f581e
### OPTIONAL ###
LOG_GROUP=-123990002
REQUEST_TIMEOUT=30
SUPPORT_GROUP=https://t.me/bytessupport

Made with ❤️️ in Kerala

Copyright & License

Explorer des projets similaires

Chargement…