Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,12 +4,27 @@ from functools import update_wrapper
|
|
| 4 |
import os
|
| 5 |
from app_rvc2 import SoniTranslate, TTS_Info
|
| 6 |
from madkoala.language_configuration import LANGUAGES_LIST, LANGUAGES, LANGUAGES_UNIDIRECTIONAL
|
| 7 |
-
import yt_dlp
|
| 8 |
from datetime import datetime
|
| 9 |
import re
|
| 10 |
import shutil
|
| 11 |
import browser_cookie3
|
| 12 |
-
import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
app = Flask(__name__)
|
| 15 |
|
|
@@ -36,7 +51,7 @@ def login_required(f):
|
|
| 36 |
@app.route('/login', methods=['GET', 'POST'])
|
| 37 |
def login():
|
| 38 |
if request.method == 'POST':
|
| 39 |
-
if request.form['password'] ==
|
| 40 |
session['logged_in'] = True
|
| 41 |
return redirect(url_for('index'))
|
| 42 |
return render_template('login.html', error='Nesprávné heslo')
|
|
|
|
| 4 |
import os
|
| 5 |
from app_rvc2 import SoniTranslate, TTS_Info
|
| 6 |
from madkoala.language_configuration import LANGUAGES_LIST, LANGUAGES, LANGUAGES_UNIDIRECTIONAL
|
|
|
|
| 7 |
from datetime import datetime
|
| 8 |
import re
|
| 9 |
import shutil
|
| 10 |
import browser_cookie3
|
| 11 |
+
import json
|
| 12 |
+
import time
|
| 13 |
+
import sys
|
| 14 |
+
from selenium import webdriver
|
| 15 |
+
from selenium.webdriver.common.by import By
|
| 16 |
+
from selenium.webdriver.support.ui import WebDriverWait
|
| 17 |
+
from selenium.webdriver.support import expected_conditions as EC
|
| 18 |
+
import pickle
|
| 19 |
+
from selenium import webdriver
|
| 20 |
+
from selenium.webdriver.common.by import By
|
| 21 |
+
from selenium.webdriver.support.ui import WebDriverWait
|
| 22 |
+
from selenium.webdriver.support import expected_conditions as EC
|
| 23 |
+
from selenium.webdriver.chrome.service import Service
|
| 24 |
+
from webdriver_manager.chrome import ChromeDriverManager
|
| 25 |
+
from selenium.webdriver.common.keys import Keys
|
| 26 |
+
from selenium.common.exceptions import TimeoutException
|
| 27 |
+
import requests
|
| 28 |
|
| 29 |
app = Flask(__name__)
|
| 30 |
|
|
|
|
| 51 |
@app.route('/login', methods=['GET', 'POST'])
|
| 52 |
def login():
|
| 53 |
if request.method == 'POST':
|
| 54 |
+
if request.form['password'] == APP_PASSWORD:
|
| 55 |
session['logged_in'] = True
|
| 56 |
return redirect(url_for('index'))
|
| 57 |
return render_template('login.html', error='Nesprávné heslo')
|