Update app.py
Browse files
app.py
CHANGED
@@ -108,7 +108,7 @@ class MediaDownloader:
|
|
108 |
@app.route('/')
|
109 |
def home():
|
110 |
return """
|
111 |
-
<h1>
|
112 |
<p>Use: /download?url=YOUR_URL_HERE</p>
|
113 |
"""
|
114 |
|
@@ -125,7 +125,7 @@ def download():
|
|
125 |
files = downloader.download_media(url)
|
126 |
|
127 |
if files and len(files) > 0:
|
128 |
-
if len(files) == 1:
|
129 |
response = make_response(send_file(files[0], as_attachment=True))
|
130 |
@response.call_on_close
|
131 |
def cleanup():
|
@@ -163,4 +163,4 @@ def download():
|
|
163 |
return f"Error: {str(e)}", 500
|
164 |
|
165 |
if __name__ == '__main__':
|
166 |
-
app.run(host='0.0.0.0', port=7860
|
|
|
108 |
@app.route('/')
|
109 |
def home():
|
110 |
return """
|
111 |
+
<h1>Social Media Downloader API</h1>
|
112 |
<p>Use: /download?url=YOUR_URL_HERE</p>
|
113 |
"""
|
114 |
|
|
|
125 |
files = downloader.download_media(url)
|
126 |
|
127 |
if files and len(files) > 0:
|
128 |
+
if len(files) == 1:
|
129 |
response = make_response(send_file(files[0], as_attachment=True))
|
130 |
@response.call_on_close
|
131 |
def cleanup():
|
|
|
163 |
return f"Error: {str(e)}", 500
|
164 |
|
165 |
if __name__ == '__main__':
|
166 |
+
app.run(host='0.0.0.0', port=7860)
|