mirror of
https://github.com/clarencechaan/ufc-cal.git
synced 2026-10-19 08:38:30 -07:00
Fix event description not separating main, prelims, early prelims
This commit is contained in:
1 parent
f2eac12956
commit
efcf7c17e2
1 file changed
+3
-3
+3
-3
@@ -160,16 +160,16 @@ async function getDetailsFromEventURL(url: URL) {
|
||||
console.log(`\nGetting details from url: ${url.href}`);
|
||||
|
||||
const mainCardElements = root.querySelectorAll(
|
||||
"#main-card--2 .l-listing__item"
|
||||
"#main-card .l-listing__item"
|
||||
);
|
||||
// Check if main card and prelims have been announced
|
||||
if (mainCardElements.length) {
|
||||
// Main card has been announced, extract prelims
|
||||
const prelimsElements = root.querySelectorAll(
|
||||
"#prelims-card--2 .l-listing__item"
|
||||
"#prelims-card .l-listing__item"
|
||||
);
|
||||
const earlyPrelimsElements = root.querySelectorAll(
|
||||
"#early-prelims--2 .l-listing__item"
|
||||
"#early-prelims .l-listing__item"
|
||||
);
|
||||
|
||||
mainCard = mainCardElements.map(convertLiToStr);
|
||||
|
||||
Reference in new issue
Block a user