Usage¶
To see the available options and arguments, run the following command:
$ instawebhooks --help
Examples¶
Send new posts:
$ instawebhooks <INSTAGRAM_USERNAME> <DISCORD_WEBHOOK_URL>
Send new posts 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 with a custom message:
$ instawebhooks -c "New post from {owner_name}: {post_url}" <INSTAGRAM_USERNAME> <DISCORD_WEBHOOK_URL>
Send new posts with no embed and a custom message:
$ instawebhooks -e -c "New post from {owner_name}: {post_url}" <INSTAGRAM_USERNAME> <DISCORD_WEBHOOK_URL>
Reference¶
Monitor Instagram accounts for new posts and send them to a Discord webhook
usage: instawebhooks [-h] [-q | -v] [-l USERNAME PASSWORD | -t USERNAME]
[-p POSTS] [-i REFRESH_INTERVAL] [-c MESSAGE_CONTENT]
[-e] [--version]
instagram_username discord_webhook_url
Positional Arguments¶
- instagram_username
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.
- discord_webhook_url
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}
Named Arguments¶
- -q, --quiet
hide all logging
Default:
False- -v, --verbose
show debug logging
Default:
False- -l, --login
login to instagram with username and password
- -t, --interactive-login
login to instagram with username and ask for password on terminal
- -p, --catchup
send the last latest posts on startup regardless of time
Default:
0- -i, --refresh-interval
time in seconds to wait before checking for new posts again
Default:
3600- -c, --message-content
the message content to send with the webhook
Default:
''Accepts placeholders for the post information:
{post_url}- The URL to the post on Instagram:https://www.instagram.com/C8wRGmyR-6N{owner_url}- The URL to the owner’s profile on Instagram:https://www.instagram.com/raenlua{owner_name}- The owner’s full name:Ryan Luu{owner_username}- The owner’s username:raenlua{post_caption}- The post’s caption:This is a post caption.{post_shortcode}- The post’s shortcode:C8wRGmyR-6N{post_image_url}- The post’s image URL:https://www.instagram.com/p/C8wRGmyR-6N/media
- -e, --no-embed
don’t show the post embed and only send message content
Default:
False- --version
show program’s version number and exit