From 2fbdc6e8cb0c3bb6ad9d1e666d5240d8835d47f7 Mon Sep 17 00:00:00 2001 From: Jules Date: Sat, 21 Mar 2026 01:15:41 +0100 Subject: [PATCH] Fix regex --- README.md | 6 +- app.py | 3 + index.html | 299 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 307 insertions(+), 1 deletion(-) create mode 100644 index.html diff --git a/README.md b/README.md index 9e96c1b..4b36381 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,15 @@ Petit applicatif pour télécharger depuis des url Spotify à l'aide de Youtube-music (flac ou mp3) backend: spotdl, sacad, falsk, flask-login -Run: +## Run: install requiments python: ``` pip install -r requirements.txt ``` +Init db sqlite: +``` +python3 app.py & ctrl+c +``` ``` python3 app.py diff --git a/app.py b/app.py index 1a82e1e..2325b7c 100644 --- a/app.py +++ b/app.py @@ -96,6 +96,9 @@ def create_admin(): def validate_spotify_url(url): patterns = [ + r'https?://open\.spotify\.com/[^/]+/track/[\w-]+', + r'https?://open\.spotify\.com/[^/]+/album/[\w-]+', + r'https?://open\.spotify\.com/[^/]+/playlist/[\w-]+', r'https?://open\.spotify\.com/track/[\w-]+', r'https?://open\.spotify\.com/album/[\w-]+', r'https?://open\.spotify\.com/playlist/[\w-]+', diff --git a/index.html b/index.html new file mode 100644 index 0000000..30ded88 --- /dev/null +++ b/index.html @@ -0,0 +1,299 @@ +{% extends "layout.html" %} + +{% block title %}Télécharger - Spotify Downloader{% endblock %} + +{% block content %} +
+
+
+
+

Nouveau téléchargement

+
+
+
+
+ + +
Accepte les tracks, albums et playlists Spotify
+ +
+ +
+
+ + +
+
+ + +
+
+
+ + +
+
+
+ +
+ + +
+
+ + +
+
+ + {% if recent_downloads %} +
+
+
Téléchargements récents
+ Voir tout +
+
+
+ {% for dl in recent_downloads %} +
+
+ + {{ dl.status }} + + {{ dl.format_type.upper() }} +
+ {{ dl.created_at.strftime('%d/%m %H:%M') }} +
+ {% endfor %} +
+
+
+ {% endif %} +
+
+{% endblock %} + +{% block extra_js %} + +{% endblock %}