Explorar el Código

perf(readability): move `transformMisusedDivsIntoParagraphs` call after `removeUnlikelyCandidates`

Julien Voisin hace 9 meses
padre
commit
86e2ce6d0b
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      internal/reader/readability/readability.go

+ 1 - 1
internal/reader/readability/readability.go

@@ -86,8 +86,8 @@ func ExtractContent(page io.Reader) (baseURL string, extractedContent string, er
 
 
 	document.Find("script,style").Remove()
 	document.Find("script,style").Remove()
 
 
-	transformMisusedDivsIntoParagraphs(document)
 	removeUnlikelyCandidates(document)
 	removeUnlikelyCandidates(document)
+	transformMisusedDivsIntoParagraphs(document)
 
 
 	candidates := getCandidates(document)
 	candidates := getCandidates(document)
 	topCandidate := getTopCandidate(document, candidates)
 	topCandidate := getTopCandidate(document, candidates)