go_service/repositories/LCWRepository.go

26 lines
462 B
Go
Raw Normal View History

2023-01-25 08:48:49 +00:00
package repositories
import helper "db_service/pkg"
type LinkParserLCW struct {
link string
}
func NewLinkParserLCW(link string) LinkParserLCW {
return LinkParserLCW{link: link}
}
func (l LinkParserLCW) ParseLink() (map[string]interface{}, error) {
helper.Info("link: ", l.link)
lcwScraper := NewLCWScraper(l.link)
product, err := lcwScraper.InitProductDetailParsing()
if err != nil {
helper.Error(err)
return nil, err
}
return product, nil
}