Monitor Instagram accounts for new posts and send them to a Discord webhook.
- Works with any Instagram account, including private accounts if you are a follower
- Customizable Discord embeds for new posts and message contents including mentions/pings
- User-definable refresh interval for checking for new posts the second they are posted
instawebhooks [-h] [-q | -v] [-i REFRESH_INTERVAL] [-c MESSAGE_CONTENT] [-e] [--version]
instagram_username discord_webhook_url
InstaWebhooks is a Python package CLI that allows you to monitor Instagram accounts for new posts and send them to a Discord webhook. It is designed to be simple to use and easy to set up, with a focus on customizability and ease of use.
Internally, InstaWebhooks uses Instaloader to fetch Instagram posts and Discord Webhooks to send messages to Discord via requests which happens to be the same dependency Instaloader uses. It uses argparse for the CLI and logging for logging.
Below, InstaWebhooks is monitoring the Instagram account raenlua for new posts and sending them to a Discord webhook every 30 minutes and sends a message to Discord with the post URL and the owner's name.
# Install InstaWebhooks
pip install instawebhooks
# Run InstaWebhooks with custom message contents
instawebhooks -c "New post from {owner_name}: {post_url}" raenlua https://discord.com/api/webhooks/0123456789/abcdefghijklmnopqrstuvwxyz
What it looks like:
InstaWebhooks is available on PyPI, and can be installed using pip:
pip install instawebhooks
For more ways to install, see Installation.
You can run instawebhooks --help
to see the full list of options and arguments available.
The most basic usage of InstaWebhooks is to provide an Instagram account and a Discord webhook URL (replace <INSTAGRAM_USERNAME>
and <DISCORD_WEBHOOK_URL>
):
instawebhooks <INSTAGRAM_USERNAME> <DISCORD_WEBHOOK_URL>
For more about each option and argument, including example templates, see Usage.
For contributions, see the contributing guidelines.
This project supports development containers, allowing you to instantly setup your development environment. For more, read about installing from dev container.