summaryrefslogtreecommitdiff
path: root/crawler/shops.go
diff options
context:
space:
mode:
authorhorus2018-09-16 17:17:04 +0200
committerhorus2018-09-16 17:17:04 +0200
commitd1ce36763bb1f5dc3d4f58b59a20cffc2b03a3a4 (patch)
treeb87dd41ba45240c746ee1cea823f918a3f2be209 /crawler/shops.go
parent03682685add64a9dd307a3d99b49717446b11b9d (diff)
downloadalkobote-d1ce36763bb1f5dc3d4f58b59a20cffc2b03a3a4.tar.gz
Rename flags. Adds new flag to exclude shops. (crawler)
Diffstat (limited to 'crawler/shops.go')
-rw-r--r--crawler/shops.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/crawler/shops.go b/crawler/shops.go
index 79eff96..224ae96 100644
--- a/crawler/shops.go
+++ b/crawler/shops.go
@@ -113,6 +113,11 @@ func (app *App) getShops() ([]Shop, error) {
shop_query = " WHERE id IN (" + shopIDs + ")"
}
+ } else if len(app.Config.ExcludeShopIDs) > 0 {
+ excludeShopIDs := strings.Join(app.Config.ExcludeShopIDs, `, `)
+ if excludeShopIDs != "" {
+ shop_query = " WHERE id NOT IN (" + excludeShopIDs + ")"
+ }
}
query := `SELECT id,name,short_url,url,logo_url,shipping_costs,free_shipping FROM shop ` + shop_query