diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 84b2b9e..6b6b037 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,6 +16,6 @@ deploy: - docker login $REGISTRY_NAME -u $DOCKER_USER -p $DOCKER_PASSWORD - docker push $IMAGE_NAME - docker push $DOCKER_IMAGE_TAG - - "curl -X POST -H \"Authorization: Bearer $GOCD_ACCESS_TOKEN\" -d '{\"repository_url\": \"https://gitlab.com/flygrounder/go-mtg-vk.git\"}' http://165.22.85.27:8153/go/admin/materials/git/notify" + # - "curl -X POST -H \"Authorization: Bearer $GOCD_ACCESS_TOKEN\" -d '{\"repository_url\": \"https://gitlab.com/flygrounder/go-mtg-vk.git\"}' http://165.22.85.27:8153/go/admin/materials/git/notify" only: - master diff --git a/cardsinfo/prices.go b/cardsinfo/prices.go index 36802fa..97dd911 100644 --- a/cardsinfo/prices.go +++ b/cardsinfo/prices.go @@ -43,9 +43,13 @@ func GetPricesScg(name string) ([]CardPrice, error) { } } editionNode := htmlquery.FindOne(block, "//p[@class=\"hawk-results-item__category\"]/a") - price.Edition = editionNode.FirstChild.Data + if editionNode.FirstChild != nil { + price.Edition = editionNode.FirstChild.Data + } priceNode := htmlquery.FindOne(block, "//div[contains(concat(' ',normalize-space(@class),' '),' hawk-results-item__options-table-cell--price ')]") - price.Price = priceNode.FirstChild.Data + if priceNode.FirstChild != nil { + price.Price = priceNode.FirstChild.Data + } results = append(results, price) } return results, nil