feat: write tools output also to output file if defined; fix XouTube transcript ' character

This commit is contained in:
Eugen Eisler
2024-10-30 13:50:45 +01:00
parent 3ec4d274c4
commit e17b96d864
5 changed files with 15 additions and 7 deletions

View File

@@ -85,7 +85,7 @@ func (o *YouTube) GrabTranscript(videoId string, language string) (ret string, e
textTags := doc.FindAll("text")
var textBuilder strings.Builder
for _, textTag := range textTags {
textBuilder.WriteString(textTag.Text())
textBuilder.WriteString(strings.ReplaceAll(textTag.Text(), "'", "'"))
textBuilder.WriteString(" ")
ret = textBuilder.String()
}