Geek7 commited on
Commit
6696238
·
verified ·
1 Parent(s): 90e5fa9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -15
app.py CHANGED
@@ -1,25 +1,25 @@
1
  import streamlit as st
2
- from insta_reels import reels_downloader
3
 
4
- def main():
5
- st.title("Instagram Reels Downloader")
 
 
 
 
6
 
7
- # Input field for Instagram Reels link
8
- link = st.text_input("Enter Instagram Reels Link:")
9
 
10
- # Input field for output path
11
- output_path = st.text_input("Enter Output Path (e.g., videos/video.mp4):")
12
 
13
  # Button to trigger the download
14
- if st.button("Download Reels"):
15
- if link and output_path:
16
- try:
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 Reels link and output path.")
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()