A simple Telegram bot for converting multiple web pages to PDF format. The user can choose to download the file in standard size or optimized for mobile devices.
- The user sends text containing several links (as plain text or hyperlinks)
- The bot converts each link to PDF in order and saves everything into a single archive
- A zip archive containing all PDF files is sent to the user (If there is only one link, the PDF file is sent directly)
Note: It is recommended to run the bot on a hosting service or server, as any Telegram bot requires constantly running code for continuous operation.
-
Prerequisites
- Python 3.8+
- Your Telegram bot token (Where to get it)
- Installed wkhtmltopdf
-
Cloning the repository
git clone https://github.com/N0Fanru/URL-to-pdf-telebot
or
download as a ZIP file and extract it -
Installing dependencies
In the command line:pip install -r requirements.txt -
Create a
.envfile based on the.env.examplefile -
Start the bot
python bot.py