diff --git a/Bahama Mama (Long Version).mp3 b/Bahama Mama (Long Version).mp3 new file mode 100644 index 0000000..8225d1c Binary files /dev/null and b/Bahama Mama (Long Version).mp3 differ diff --git a/Dire Straits - Walk of Life (Official Audio).mp3 b/Dire Straits - Walk of Life (Official Audio).mp3 new file mode 100644 index 0000000..2fd9e67 Binary files /dev/null and b/Dire Straits - Walk of Life (Official Audio).mp3 differ diff --git a/One Night In Bangkok.mp3 b/One Night In Bangkok.mp3 new file mode 100644 index 0000000..a57cb22 Binary files /dev/null and b/One Night In Bangkok.mp3 differ diff --git a/downloader.py b/downloader.py new file mode 100644 index 0000000..f297cbd --- /dev/null +++ b/downloader.py @@ -0,0 +1,56 @@ +import yt_dlp +import os +import re + +def clean_filename(title): + # Remove quotes and illegal characters + title = title.strip("'").strip('"') + return re.sub(r'[\\/*?:"<>|]', "", title) + +def download_mp3(url, quality='320'): + print(f"\nš Processing: {url}") + + # 1. Fetch Title First (Clean Name) + try: + with yt_dlp.YoutubeDL({'quiet':True}) as ydl: + info = ydl.extract_info(url, download=False) + if 'entries' in info: + title = '%(title)s' # Playlist default + else: + title = clean_filename(info['title']) + print(f"š Renaming to: {title}") + except Exception as e: + print(f"ā Error fetching info: {e}") + return {"success": False, "error": "Invalid URL or video unavailable"} + + # 2. Download Options (adjustable quality) + ydl_opts = { + 'format': 'bestaudio/best', + 'postprocessors': [{ + 'key': 'FFmpegExtractAudio', + 'preferredcodec': 'mp3', + 'preferredquality': quality, + }], + 'outtmpl': f'music/{title}.%(ext)s', + 'quiet': False, + 'no_warnings': True, + } + + try: + with yt_dlp.YoutubeDL(ydl_opts) as ydl: + ydl.download([url]) + print("ā Success! (Hit Refresh in the App)") + return {"success": True, "title": title} + except Exception as e: + print(f"ā Error: {e}") + return {"success": False, "error": str(e)} + +if __name__ == "__main__": + if not os.path.exists("music"): + os.makedirs("music") + + print("--- TECHDJ DOWNLOADER (320kbps) ---") + while True: + url = input("\nš URL (q to quit): ").strip() + if url.lower() == 'q': break + if url: download_mp3(url) diff --git a/edge_glow_test.html b/edge_glow_test.html new file mode 100644 index 0000000..639cfa4 --- /dev/null +++ b/edge_glow_test.html @@ -0,0 +1,162 @@ + + + +
+