Skip to content

Commit

Permalink
Solve the trailing 'Taga' issue
Browse files Browse the repository at this point in the history
  • Loading branch information
deven96 committed Jun 5, 2020
1 parent 15d77e7 commit 34c4cfa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion engine/fzmovies.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ func (engine *FzEngine) parseSingleMovie(el *colly.HTMLElement, index int) (Movi
if err != nil {
log.Fatal(err)
}
// download link is current link path + /download
downloadLink.Path = path.Join(engine.BaseURL.Path, downloadLink.Path)

movie.DownloadLink = downloadLink
Expand All @@ -104,6 +103,9 @@ func (engine *FzEngine) updateDownloadProps(downloadCollector *colly.Collector,
dl := strings.TrimPrefix(stringsub[0], "(")
movie.Size = dl
}
if strings.HasSuffix(movie.Title, "Tags") {
movie.Title = strings.TrimSuffix(movie.Title, "Tags")
}
downloadCollector.Visit(downloadLink.String())
})

Expand Down

0 comments on commit 34c4cfa

Please sign in to comment.