Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,6 +6,73 @@ def show_website():
|
|
| 6 |
<!DOCTYPE html>
|
| 7 |
<html lang="en">
|
| 8 |
<head>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
<meta charset="UTF-8">
|
| 10 |
<title>Suno Embed</title>
|
| 11 |
<style>
|
|
|
|
| 6 |
<!DOCTYPE html>
|
| 7 |
<html lang="en">
|
| 8 |
<head>
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
<!DOCTYPE html>
|
| 15 |
+
<html lang="en">
|
| 16 |
+
<head>
|
| 17 |
+
<meta charset="UTF-8">
|
| 18 |
+
<title>Suno MP3 Converter</title>
|
| 19 |
+
<style>
|
| 20 |
+
body { font-family:sans-serif; background:#111; color:#eee; padding:2rem; }
|
| 21 |
+
input, button { padding:0.5rem; margin:0.5rem 0; width:100%; }
|
| 22 |
+
a { color:#0f0; display:block; margin-top:1rem; }
|
| 23 |
+
</style>
|
| 24 |
+
</head>
|
| 25 |
+
<body>
|
| 26 |
+
|
| 27 |
+
<h1>Suno Song → Direct MP3</h1>
|
| 28 |
+
|
| 29 |
+
<input id="songUrl" placeholder="Paste Suno song URL here" />
|
| 30 |
+
<button id="convertBtn">Convert to MP3</button>
|
| 31 |
+
|
| 32 |
+
<div id="result"></div>
|
| 33 |
+
|
| 34 |
+
<script>
|
| 35 |
+
document.getElementById("convertBtn").onclick = () => {
|
| 36 |
+
const url = document.getElementById("songUrl").value.trim();
|
| 37 |
+
const match = url.match(/suno\.com\/song\/([a-f0-9\-]+)/i);
|
| 38 |
+
if(match){
|
| 39 |
+
const uuid = match[1];
|
| 40 |
+
const mp3Url = `https://cdn1.suno.ai/${uuid}.mp3`;
|
| 41 |
+
document.getElementById("result").innerHTML = `
|
| 42 |
+
<p>Direct MP3 URL:</p>
|
| 43 |
+
<a href="${mp3Url}" download>Download MP3</a>
|
| 44 |
+
<audio controls src="${mp3Url}"></audio>
|
| 45 |
+
`;
|
| 46 |
+
} else {
|
| 47 |
+
document.getElementById("result").innerHTML = `<p style="color:red;">Invalid Suno URL!</p>`;
|
| 48 |
+
}
|
| 49 |
+
};
|
| 50 |
+
</script>
|
| 51 |
+
|
| 52 |
+
</body>
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
|
| 76 |
<meta charset="UTF-8">
|
| 77 |
<title>Suno Embed</title>
|
| 78 |
<style>
|