diff --git a/websitepart.py b/websitepart.py
index 4f760de..d6afe7d 100644
--- a/websitepart.py
+++ b/websitepart.py
@@ -10,25 +10,8 @@ app.config['LYRICS_DIR'] = 'lyrics'
code = ""
history = []
-def is_youtube_url(url):
- yt_patterns = [
- r'youtube\.com/watch\?v=',
- r'music\.youtube\.com/watch\?v=',
- r'youtu\.be/'
- ]
- return any(re.search(pattern, url) for pattern in yt_patterns)
-
-def extract_yt_id(url):
- patterns = [
- r'v=([a-zA-Z0-9_-]{11})',
- r'youtu\.be/([a-zA-Z0-9_-]{11})',
- r'/([a-zA-Z0-9_-]{11})$'
- ]
- for pattern in patterns:
- match = re.search(pattern, url)
- if match:
- return match.group(1)
- return None
+def is_youtube_id(a):
+ return re.match(r'^[a-zA-Z0-9_-]{11}$', a) is not None
@app.route('/musicstatus.html', methods=['GET', 'POST'])
def musicstatus():
@@ -44,7 +27,7 @@ def musicstatus():
data['music'],
data['time'],
data['resetstatus'],
- data['videoid']
+ data['videoid'] # Tam URL saklanıyor
)
if data.get('resetstatus', '').lower() == "true":
@@ -76,7 +59,8 @@ def musicstatus():
-
+
+