From d1ce36763bb1f5dc3d4f58b59a20cffc2b03a3a4 Mon Sep 17 00:00:00 2001 From: horus Date: Sun, 16 Sep 2018 17:17:04 +0200 Subject: Rename flags. Adds new flag to exclude shops. (crawler) --- crawler/shops.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'crawler/shops.go') 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 -- cgit v1.2.3