-
-
Notifications
You must be signed in to change notification settings - Fork 1
Usage
Usage is simple once you have everything installed, just run the script with the Instagram username you want to monitor and the Discord webhook URL you want to send new posts to.
$ instawebhooks
usage: instawebhooks [-h] [-v] [-i REFRESH_INTERVAL] [-c MESSAGE_CONTENT] [-e] [--version] instagram_username discord_webhook_url
In the below templates, replace <INSTAGRAM_USERNAME>
with the Instagram username you want to monitor and <DISCORD_WEBHOOK_URL>
with the Discord webhook URL you want to send new posts to.
- Send new posts every hour:
instawebhooks <INSTAGRAM_USERNAME> <DISCORD_WEBHOOK_URL>
Send new posts every hour with verbose logging:
instawebhooks -v <INSTAGRAM_USERNAME> <DISCORD_WEBHOOK_URL>
- Send new posts every 30 minutes:
instawebhooks -i 1800 <INSTAGRAM_USERNAME> <DISCORD_WEBHOOK_URL>
- Send new posts every hour with a custom message:
instawebhooks -c "New post from {owner_name}: {post_url}" <INSTAGRAM_USERNAME> <DISCORD_WEBHOOK_URL>
- Send new posts every hour with no embed and a custom message:
instawebhooks -e -c "New post from {owner_name}: {post_url}" <INSTAGRAM_USERNAME> <DISCORD_WEBHOOK_URL>
The Instagram username to monitor for new posts.
Usernames must follow the Instagram username format:
- Starts with a letter or underscore.
- Does not contain consecutive periods.
- Is between 2 and 30 characters long.
- Ends with an alphanumeric character or underscore.
The Discord webhook URL to send new posts to.
URLs must follow the Discord webhook URL format:
https://discord.com/api/webhooks/{webhook_id}/{webhook_token}
https://discordapp.com/api/webhooks/{webhook_id}/{webhook_token}
Show this help message and exit.
Enable verbose logging.
Changes the logging level to debug, showing the following logs in addition to the default info logs:
- When a check for new posts is started.
- If a new post is found or not.
- When a post is sent to Discord.
Caution
Do not set the refresh interval too low or you may be rate limited by Instagram.
The refresh interval to check for new posts in seconds (default: 3600).
The message content to send to Discord (default: "").
Accepts placeholders for the post information:
-
{post_url}
- The URL to the post on Instagramhttps://www.instagram.com/C8wRGmyR-6N
-
{owner_url}
- The URL to the owner's profile on Instagramhttps://www.instagram.com/raenlua
-
{owner_name}
- The owner's full nameRyan Luu
-
{owner_username}
- The owner's usernameraenlua
-
{post_caption}
- The post's captionThis is a post caption.
-
{post_shortcode}
- The post's shortcodeC8wRGmyR-6N
-
{post_image_url}
- The post's image URLhttps://www.instagram.com/p/C8wRGmyR-6N/media
Don't show the post embed and only send message content
A message content must be provided when using this option. Empty messages cannot be sent.
Important
Documentation has been moved to our own Read the Docs project. Documentation on the GitHub Wiki may be outdated.