Update app.py
Browse files
app.py
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
import streamlit as st
|
2 |
-
|
3 |
|
4 |
-
def
|
5 |
-
|
|
|
|
|
|
|
|
|
6 |
|
7 |
-
|
8 |
-
|
9 |
|
10 |
-
# Input field for
|
11 |
-
|
12 |
|
13 |
# Button to trigger the download
|
14 |
-
if st.button("Download
|
15 |
-
if
|
16 |
-
|
17 |
-
download(link, output_path)
|
18 |
-
st.success("Reels downloaded successfully!")
|
19 |
-
except Exception as e:
|
20 |
-
st.error(f"Error: {str(e)}")
|
21 |
else:
|
22 |
-
st.warning("Please enter valid Instagram
|
23 |
|
24 |
if __name__ == "__main__":
|
25 |
main()
|
|
|
1 |
import streamlit as st
|
2 |
+
import instaloader
|
3 |
|
4 |
+
def download_instagram_profile(username):
|
5 |
+
try:
|
6 |
+
instaloader.Instaloader().download_profile(username, profile_pic_only=False)
|
7 |
+
st.success(f"Profile downloaded successfully for {username}!")
|
8 |
+
except Exception as e:
|
9 |
+
st.error(f"Error: {str(e)}")
|
10 |
|
11 |
+
def main():
|
12 |
+
st.title("Instagram Profile Downloader")
|
13 |
|
14 |
+
# Input field for Instagram username
|
15 |
+
username = st.text_input("Enter Instagram Username:")
|
16 |
|
17 |
# Button to trigger the download
|
18 |
+
if st.button("Download Profile"):
|
19 |
+
if username:
|
20 |
+
download_instagram_profile(username)
|
|
|
|
|
|
|
|
|
21 |
else:
|
22 |
+
st.warning("Please enter a valid Instagram username.")
|
23 |
|
24 |
if __name__ == "__main__":
|
25 |
main()
|