Skip to content

Commit

Permalink
Refactor instaloader
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanLua authored Jul 14, 2024
1 parent 5d84573 commit 0cbeb15
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/instawebhooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ def discord_webhook_url(arg_value):
logger.info("Starting InstaWebhooks for https://www.instagram.com/%s on %s",
args.instagram_username, args.discord_webhook_url)

# Initialize Instaloader and get the Instagram profile
L = Instaloader()


def send_to_discord(post):
"""Send a new Instagram post to Discord using a webhook."""
Expand Down Expand Up @@ -126,7 +123,7 @@ def check_for_new_posts():
args.instagram_username)

posts = Profile.from_username(
L.context, args.instagram_username).get_posts()
Instaloader().context, args.instagram_username).get_posts()

for post in posts:
logger.info('New post found: https://instagram.com/p/%s',
Expand Down

0 comments on commit 0cbeb15

Please sign in to comment.