updated description to grab raw html
This commit is contained in:
		
							parent
							
								
									07bb549d44
								
							
						
					
					
						commit
						1d25f4e112
					
				
							
								
								
									
										9
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								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")), | ||||
| 		} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user