refactor: remove redundant code

This commit is contained in:
rramiachraf
2024-06-11 21:25:27 +01:00
parent 8545cb313c
commit 7e26bf48f6
3 changed files with 5 additions and 4 deletions

View File

@ -2,9 +2,9 @@ package data
import (
"encoding/json"
"strings"
"github.com/PuerkitoBio/goquery"
"github.com/rramiachraf/dumb/utils"
)
type ArtistPreview struct {
@ -53,7 +53,7 @@ func (a *Artist) parseArtistData(doc *goquery.Document) error {
a.Albums = append(a.Albums, AlbumPreview{
Name: album.Name,
Image: album.Image,
URL: strings.Replace(album.URL, "https://genius.com", "", -1),
URL: utils.TrimURL(album.URL),
})
}