Update app.py
Browse files
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 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
|
|
|
|
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")
|