Skip to content

Commit 22213c6

Browse files
committed
remove newline to fix #31
1 parent 72b9b7b commit 22213c6

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

cmd/utils.go

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ func SelectOpts(title string, options []string) (int, string) {
4343
Size: 10,
4444
}
4545

46+
log.Debug(prompt)
4647
index, result, err := prompt.Run()
4748
if err != nil {
4849
log.Fatalf("Prompt failed %v\n", err)

engine/coolmoviez.go

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ func (engine *CoolMoviez) parseSingleMovie(el *colly.HTMLElement, index int) (Mo
6969
if strings.HasSuffix(movie.Title, appendage) {
7070
movie.Title = strings.TrimSuffix(movie.Title, appendage)
7171
}
72+
movie.Title = strings.TrimSuffix(movie.Title, "\n")
7273
re := regexp.MustCompile(`(\d+)`)
7374
stringsub := re.FindStringSubmatch(movie.Title)
7475
if len(stringsub) > 0 {

0 commit comments

Comments
 (0)