fix gog and epic scraper
This commit is contained in:
parent
168d67fd0c
commit
29e06127ee
3 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue