fix gog and epic scraper

This commit is contained in:
Seraphim Strub 2024-06-21 15:15:03 +00:00
parent 168d67fd0c
commit 29e06127ee
3 changed files with 5 additions and 4 deletions

View file

@ -126,7 +126,7 @@ func (e EpicStruct) Load() error {
image := ""
for _, keyImage := range element.KeyImages {
if keyImage.Type == "DieselStoreFrontWide" {
if keyImage.Type == "OfferImageWide" {
image = keyImage.Url
}
}

View file

@ -70,11 +70,11 @@ func (e GogFrontStruct) Load() error {
continue
}
for _, a := range t.Attr {
if !(a.Key == "id" && a.Val == "giveaway") {
if !(a.Key == "class" && a.Val == "giveaway__overlay-link") {
continue
}
for _, attr := range t.Attr {
if attr.Key != "ng-href" {
if attr.Key != "href" {
continue
}
appID := regexAppid.FindStringSubmatch(attr.Val)

View file

@ -64,7 +64,8 @@ func main() {
api.NewSteamApi(logger),
api.NewGogFrontApi(logger),
api.NewGogApi(logger),
api.NewHumbleBundleApi(logger))
api.NewHumbleBundleApi(logger),
)
for _, a := range apis {
err := a.Load()
if err != nil {