Spaces:
Sleeping
Sleeping
GPTfree api
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -4,11 +4,11 @@ import youtube_dl
|
|
4 |
|
5 |
app = Flask(__name__)
|
6 |
|
7 |
-
@app.route('/download', methods=['
|
8 |
def download_video():
|
9 |
try:
|
10 |
-
#
|
11 |
-
video_url = request.
|
12 |
if not video_url:
|
13 |
return jsonify({"error": "URL is required"}), 400
|
14 |
|
|
|
4 |
|
5 |
app = Flask(__name__)
|
6 |
|
7 |
+
@app.route('/download', methods=['GET'])
|
8 |
def download_video():
|
9 |
try:
|
10 |
+
# クエリパラメータからURLを取得
|
11 |
+
video_url = request.args.get('url')
|
12 |
if not video_url:
|
13 |
return jsonify({"error": "URL is required"}), 400
|
14 |
|