From 1d25f4e112021f8c31330da976fdec5c2d01d570 Mon Sep 17 00:00:00 2001 From: christian Date: Sun, 9 Jun 2024 12:40:42 +0200 Subject: [PATCH] updated description to grab raw html --- main.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 889f6a5..e20573c 100644 --- a/main.go +++ b/main.go @@ -113,6 +113,13 @@ func scrapeJobs() { cutRight := ");" trimmedLogo := strings.Trim(logo, cutLeft+cutRight) + // Get job description + // Get the HTML of the description + descriptionHTML, err := e.DOM.Find("content.text-block__content > span").Html() + if err != nil { + log.Printf("Error getting HTML of description: %s", err) + return + } // Get company name jobDetails := job{ Title: e.ChildText("h2[class=view-job-details__title]"), @@ -120,7 +127,7 @@ func scrapeJobs() { Company: e.ChildText(".bullet-inline-list > a:first-child"), Location: e.ChildText(".bullet-inline-list > a:nth-child(2)"), Type: e.ChildText(".bullet-inline-list > a:nth-child(3)"), - Description: e.ChildText("content.text-block__content > span"), + Description: descriptionHTML, Link: e.Request.URL.String(), Skills: skillChecker(e.ChildText("content.text-block__content > span")), }