/Web-Screenshot-Bot

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

Primary LanguagePythonGNU Affero General Public License v3.0AGPL-3.0

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 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

an example config.env 👇

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

Made with ❤️️ in Kerala

Copyright & License