Fix location formatting

This commit is contained in:
Clarence Chan committed 2025-06-07 19:50:02 -04:00
1 parent 95a9ffd977
commit 22bef75c69
1 file changed
+7 -2
+7 -2
View File
@@ -147,8 +147,11 @@ async function getDetailsFromEventURL(url: URL) {
let location =
root
.querySelector(".field--name-venue")
?.innerText.replaceAll("\n", "")
.replaceAll(" ", " ") || "";
?.innerText.replaceAll(",", "")
.split("\n")
.filter((str) => str)
.map((str) => str.trim())
.join(", ") || "";
let fightCard: string[] = [];
let mainCard: string[] = [];
let prelims: string[] = [];
@@ -231,3 +234,5 @@ async function getAllDetailedEvents() {
}
export { getAllDetailedEvents };
getDetailsFromEventURL(new URL("https://www.ufc.com/event/ufc-312"));