Go Back


15.02.2023

Instagram Discord Poster

Download the script here. A Python script, that searches the new post of a specific Instagram Account and post it on a specific Discord Channel.

Updated: 2023-02-02
Changes: You can now add multiple Instagram Accounts to the script. The script will post the new posts of all the Accounts on the Discord Channel.

Updated: 2023-02-15
Changes: Added a sleep timer, so the script does not spam the Discord Channel and does not reach the rate limit. And added new check for new posts. It seems, that instagram changes the URL for the media after some time.

Requirements

  • Python 3.10 or higher
  • instaloader
  • discord.py
  • python-dotenv
  • A Discord Bot Token
  • An Instagram Account
  • The old_post.json file is needed for the script to work. It has to be in the same directory as the script. Modify the file to your needs.

Installation

  • Install Python 3.10 or higher
  • Install instaloader, discord.py and python-dotenv via pip
  • Create a Discord Bot and copy the Token
  • Create a Instagram Account and copy the Username and Password
  • Create a .env file and add the following lines:
    • INSTAGRAM_USERNAME=''
    • INSTAGRAM_PASSWORD=''
    • DISCORD_TOKEN=''
  • Add the Channel ID of the Discord Channel you want to post the Instagram Posts to the script. Line 63. (channel = client.get_channel(CHANNEL_ID)) (How to get the Channel ID) (For some reason, the Channel ID does not work in the .env file)
  • Run the script

Feel free to report any bugs or issues.

© 2023 Copyright:Lokianer
Send me an email: mail@lokianer.de