updated description to grab raw html

This commit is contained in:
christian 2024-06-09 12:40:42 +02:00
parent 07bb549d44
commit 1d25f4e112

View File

@ -113,6 +113,13 @@ func scrapeJobs() {
cutRight := ");" cutRight := ");"
trimmedLogo := strings.Trim(logo, cutLeft+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 // Get company name
jobDetails := job{ jobDetails := job{
Title: e.ChildText("h2[class=view-job-details__title]"), Title: e.ChildText("h2[class=view-job-details__title]"),
@ -120,7 +127,7 @@ func scrapeJobs() {
Company: e.ChildText(".bullet-inline-list > a:first-child"), Company: e.ChildText(".bullet-inline-list > a:first-child"),
Location: e.ChildText(".bullet-inline-list > a:nth-child(2)"), Location: e.ChildText(".bullet-inline-list > a:nth-child(2)"),
Type: e.ChildText(".bullet-inline-list > a:nth-child(3)"), 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(), Link: e.Request.URL.String(),
Skills: skillChecker(e.ChildText("content.text-block__content > span")), Skills: skillChecker(e.ChildText("content.text-block__content > span")),
} }