GPTfree api commited on
Commit
fc187ac
·
verified ·
1 Parent(s): f82aa7a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -4,11 +4,11 @@ import youtube_dl
4
 
5
  app = Flask(__name__)
6
 
7
- @app.route('/download', methods=['POST'])
8
  def download_video():
9
  try:
10
- # リクエストからURLを取得
11
- video_url = request.json.get('url')
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