Fixed empty line error of randomizer module for website

This commit is contained in:
Halhadus 2024-11-25 03:45:06 +03:00
parent 9e351ea4ac
commit 3d3170e8f4

View file

@ -5,6 +5,7 @@ import requests
def randomize(listurl):
# Please don't refresh too fast and kill my website and git server...
musiclist = requests.get(listurl).text.split("\n")
musiclist = [music for music in musiclist if music != ""]
html = "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<link href=\"https://fonts.googleapis.com/css2?family=Jetbrains+Mono:wght@400;700&display=swap\" rel=\"stylesheet\">\n</head>\n<body style=\"background-color: #1f1f1f; color: #ffffff; font-family: 'Jetbrains Mono', monospace;\">\n"
html += "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n"
html += "<title>Halhadus' Music List</title>\n"