From e061a82cbca53d92866ed303f18b7427839e18fa Mon Sep 17 00:00:00 2001 From: Clarence Chan Date: Wed, 13 Sep 2023 11:36:40 -0400 Subject: [PATCH] include full link in getEventLinks --- scrape.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scrape.js b/scrape.js index 8adbd87d..6be936e7 100644 --- a/scrape.js +++ b/scrape.js @@ -9,7 +9,9 @@ async function getEventLinks() { let links = root.querySelectorAll( "#events-list-upcoming h3.c-card-event--result__headline" ); - links = links.map((html) => html.firstChild.getAttribute("href")); + links = links.map( + (html) => "https://www.ufc.com" + html.firstChild.getAttribute("href") + ); return links; } catch (error) { console.error(error);