prasanth.thangavel
commited on
Commit
·
4789c01
1
Parent(s):
0d1e776
Add option for public deployment without authentication (i.e. no cookies)
Browse files
app.py
CHANGED
@@ -112,14 +112,15 @@ def download_for_browser(url, mode='audio', quality='high'):
|
|
112 |
# Create temporary directory that persists until file is served
|
113 |
temp_dir = Path(tempfile.mkdtemp())
|
114 |
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
|
|
123 |
|
124 |
try:
|
125 |
# Configure download options
|
|
|
112 |
# Create temporary directory that persists until file is served
|
113 |
temp_dir = Path(tempfile.mkdtemp())
|
114 |
|
115 |
+
if USE_FIREFOX_COOKIES == "True":
|
116 |
+
# Convert cookie file to env and save locally
|
117 |
+
#cookie_file = "cookies.firefox-private.txt"
|
118 |
+
#env_content = cookies_to_env(cookie_file)
|
119 |
+
#save_to_env_file(env_content)
|
120 |
+
|
121 |
+
# Convert back to cookie file using .env
|
122 |
+
cookiefile = "firefox-cookies.txt"
|
123 |
+
env_to_cookies_from_env("firefox-cookies.txt")
|
124 |
|
125 |
try:
|
126 |
# Configure download options
|