7jimmy commited on
Commit
891b86c
·
verified ·
1 Parent(s): 59b74ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -1,6 +1,5 @@
1
  import streamlit as st
2
  import json
3
- from dotenv import load_dotenv
4
  from profile_data import Instagram
5
  import instaloader
6
  from instaloader import Profile, Post
@@ -9,9 +8,6 @@ from math import ceil
9
  import humanize
10
  from tqdm import tqdm
11
 
12
- # Load env file to get secrets
13
- load_dotenv()
14
-
15
  def login_with_progress(INSTAGRAM_USERNAME, INSTAGRAM_PASSWORD):
16
  # Get instance
17
  instance = instaloader.Instaloader()
@@ -29,7 +25,7 @@ def login_with_progress(INSTAGRAM_USERNAME, INSTAGRAM_PASSWORD):
29
  return None
30
 
31
  # Get Profile Info
32
- def get_profile_info(username):
33
  profile_scrap = Instagram.scrap(username=username) # Call Scrap method from Instagram File
34
  data_dict = json.loads(profile_scrap)
35
 
@@ -67,7 +63,7 @@ def main():
67
 
68
  if selected_action == "Profile Information":
69
  username = st.text_input("Enter the Instagram username:")
70
- get_profile_info(username)
71
  # Add other actions here...
72
 
73
  else:
 
1
  import streamlit as st
2
  import json
 
3
  from profile_data import Instagram
4
  import instaloader
5
  from instaloader import Profile, Post
 
8
  import humanize
9
  from tqdm import tqdm
10
 
 
 
 
11
  def login_with_progress(INSTAGRAM_USERNAME, INSTAGRAM_PASSWORD):
12
  # Get instance
13
  instance = instaloader.Instaloader()
 
25
  return None
26
 
27
  # Get Profile Info
28
+ def get_profile_info(username, instance):
29
  profile_scrap = Instagram.scrap(username=username) # Call Scrap method from Instagram File
30
  data_dict = json.loads(profile_scrap)
31
 
 
63
 
64
  if selected_action == "Profile Information":
65
  username = st.text_input("Enter the Instagram username:")
66
+ get_profile_info(username, instance)
67
  # Add other actions here...
68
 
69
  else: