euler314 commited on
Commit
edcfc24
·
verified ·
1 Parent(s): 96b5b31

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +37 -34
app.py CHANGED
@@ -604,41 +604,44 @@ def main():
604
  st.title("Advanced File Downloader")
605
 
606
  # Sidebar settings
 
607
  with st.expander("Advanced Options"):
608
- custom_extensions = st.text_input(
609
- "Custom File Extensions",
610
- placeholder=".csv, .txt, .epub"
611
- )
612
- max_sublinks = st.number_input(
613
- "Maximum Sublinks to Process",
614
- min_value=1,
615
- max_value=10000,
616
- value=100,
617
- step=50,
618
- help="Maximum number of sublinks to process from the main page"
619
- )
620
- sublink_timeout = st.number_input(
621
- "Search Timeout (seconds per sublink)",
622
- min_value=1,
623
- max_value=3000,
624
- value=30,
625
- step=5,
626
- help="Maximum time to spend searching each sublink"
627
- )
628
- use_proxy = st.checkbox("Use Proxy")
629
- proxy = st.text_input("Proxy URL", placeholder="http://proxy:port")
630
-
631
- # Google Drive Integration
632
- with st.expander("Google Drive Integration"):
633
- if st.button("Start Google Sign-In"):
634
- auth_url = get_google_auth_url()
635
- st.markdown(f"[Click here to authorize]({auth_url})")
636
-
637
- auth_code = st.text_input("Enter authorization code")
638
- if st.button("Complete Sign-In") and auth_code:
639
- creds, msg = exchange_code_for_credentials(auth_code)
640
- st.session_state.google_creds = creds
641
- st.write(msg)
 
 
642
 
643
  if mode == "Manual URL":
644
  st.header("Manual URL Mode")
 
604
  st.title("Advanced File Downloader")
605
 
606
  # Sidebar settings
607
+ st.header("Settings")
608
  with st.expander("Advanced Options"):
609
+ custom_extensions = st.text_input(
610
+ "Custom File Extensions",
611
+ placeholder=".csv, .txt, .epub"
612
+ )
613
+ max_sublinks = st.number_input(
614
+ "Maximum Sublinks to Process",
615
+ min_value=1,
616
+ max_value=10000,
617
+ value=100,
618
+ step=50,
619
+ help="Maximum number of sublinks to process from the main page"
620
+ )
621
+ sublink_timeout = st.number_input(
622
+ "Search Timeout (seconds per sublink)",
623
+ min_value=1,
624
+ max_value=3000,
625
+ value=30,
626
+ step=5,
627
+ help="Maximum time to spend searching each sublink"
628
+ )
629
+ use_proxy = st.checkbox("Use Proxy")
630
+ proxy = st.text_input("Proxy URL", placeholder="http://proxy:port")
631
+
632
+ # Google Drive Integration
633
+ with st.expander("Google Drive Integration"):
634
+ if st.button("Start Google Sign-In"):
635
+ auth_url = get_google_auth_url()
636
+ st.markdown(f"[Click here to authorize]({auth_url})")
637
+
638
+ auth_code = st.text_input("Enter authorization code")
639
+ if st.button("Complete Sign-In") and auth_code:
640
+ creds, msg = exchange_code_for_credentials(auth_code)
641
+ st.session_state.google_creds = creds
642
+ st.write(msg)
643
+
644
+ url = st.text_input("Enter URL", placeholder="https://example.com")
645
 
646
  if mode == "Manual URL":
647
  st.header("Manual URL Mode")