Skip to content

Commit

Permalink
simplified the way hrefs for tufilms are parsed
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Nov 1, 2023
1 parent 8611f81 commit d256ed3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/backend/cron/movie_parsers/tufilm.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ func parseImageUrl(doc *goquery.Document) string {
return "https://www.tu-film.de/img/film/poster/berraschungsfilm.jpg"
}
sanitisedHref := bluemonday.StrictPolicy().Sanitize(href)
sanitisedHref = strings.ReplaceAll(sanitisedHref, "/img/film/poster/.sized.", "/img/film/poster/")
sanitisedHref = strings.ReplaceAll(sanitisedHref, "/img/film/poster/.thumb.", "/img/film/poster/")
sanitisedHref = strings.ReplaceAll(sanitisedHref, "poster/.sized.", "poster/")
sanitisedHref = strings.ReplaceAll(sanitisedHref, "poster/.thumb.", "poster/")
return "https://www.tu-film.de" + sanitisedHref
}

Expand Down

0 comments on commit d256ed3

Please sign in to comment.