screenshot from the web for discord webhooks

screenhook is a script that captures an image of a web page and send it to a discord webhook.

Getting started


sudo apt update && sudo apt upgrade
sudo apt install chromium-chromedriver
curl -fsSl | sh
cd screenhook


when you run the script for the first time you will be prompted to enter some configuration.
later you will be able to edit the configuration file (config.json) that has been created with the following options:

  • WEBSITE_URL: the website to target (include http protocol)

  • WEBHOOK_URL: the discord webhook url that will look something like this:

  • WAIT_BEFORE_SCREENSHOT: the amount of time to wait before taking the screenshot (in seconds)

    "WEBSITE_URL": "",
    "WEBHOOK_URL": "",

automatic execution

crontab installation and settings

sudo apt update
sudo apt install cron
crontab -e

after creating the config file by running the program at least once now go to the end of the crontab file and paste @weekly /bin/python3 /home/user/screenhook/

Other examples Description
0 * * * * /bin/python3 /home/user/screenhook/ run the command every hour
@daily /bin/python3 /home/user/screenhook/ run the command every day
00 14 * * sat /bin/python3 /home/user/screenhook/ run the command every Saturday at 14:00
@reboot /bin/python3 /home/user/screenhook/ run the command every reboot

You can find more examples on crontab guru


View Github