A Telegram Web-Screenshot Bot Based on Playwright
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.
- Image [PNG/JPEG]
- 800x600
- 1280x720
- 1920x1080
- 2560x1440
- PDF
- Letter
- Legal
- A4
- A5
Splitting of long pages are available for png and jpeg.
Note: the bot requires chromium/chrome binary to render websites. Simply clone the repository and run the main file:
git clone https://github.com/alenpaul2001/Web-Screenshot-Bot.git
cd Web-Screenshot-Bot
python -m pip install poetry
poetry install --no-dev && poetry shell
# Install chrome if you don't have it in your system
playwright install chrome
# <Create config.env appropriately>
python3 __main__.py
BOT_TOKEN=12345:49dc3eeb1aehda3cI2TesHNHc
API_ID=256123
API_HASH=eb06d4abfb49dc3eeb1aeb98ae0f581e
### OPTIONAL ###
LOG_GROUP=-123990002
SUPPORT_GROUP_LINK=https://t.me/bytessupport
- Copyright (C) 2023 by AlenPaulVarghese
- Licensed under the terms of the GNU AGPL Version 3.0