Skip to content

Commit

Permalink
Add login information
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanLua authored Jul 2, 2024
1 parent 7898941 commit ba35da5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/instagram_to_discord.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
"""
Get new Instagram posts from any Instagram profile and send them to Discord using webhooks.
Make sure that you have everything in the requirements.txt file installed and that you are logged into Instaloader.
Use the following to login:
instaloader -l USERNAME
If the login fails, you may need to use import_firefox_session.py to get your session file and login using that.
"""

import instaloader
import requests
import time

INSTAGRAM_PROFILE = input("Enter the Instagram account you want monitor: ")
INSTAGRAM_USERNAME = input("Enter your Instagram username to login: ")
WEBHOOK_URL = input("Enter the Discord webhook URL: ")

# Get instance
L = instaloader.Instaloader()
L.load_session_from_file(INSTAGRAM_PROFILE, "./session-*")

def send_to_discord(post_url):
"""Send the Instagram post URL to Discord."""
Expand Down

0 comments on commit ba35da5

Please sign in to comment.