diff --git a/contact-scrape-test/contact-scrape.go b/contact-scrape-test/contact-scrape.go index 6f96978..6f803e9 100644 --- a/contact-scrape-test/contact-scrape.go +++ b/contact-scrape-test/contact-scrape.go @@ -217,9 +217,13 @@ func parseTable(f *excelize.File, sheetName, startCol, endCol string, tableNum i continue } - // Check for "Aktualizace" - end of data - if len(row) > nameCol && strings.Contains(strings.ToLower(row[nameCol]), "aktualizace") { - break + // Skip general contacts and update date line + if strings.Contains(row[nameCol], "převzetí hovoru") || + strings.Contains(row[nameCol], "hlavní vchod") || + strings.Contains(row[nameCol], "brána") || + strings.HasPrefix(row[nameCol], "Aktualizace dne") || + strings.HasPrefix(row[nameCol], "Poslední aktualizace") { + continue } // Check for special formatting rows (like "*02(xx)") @@ -246,11 +250,6 @@ func parseTable(f *excelize.File, sheetName, startCol, endCol string, tableNum i phone = cleanPhoneNumber(phone) servicePhone = cleanPhoneNumber(servicePhone) - // Skip general contacts that don't have names - if strings.Contains(name, "převzetí hovoru") || strings.Contains(name, "hlavní vchod") || strings.Contains(name, "brána") { - continue - } - // If we have a name, start a new contact if name != "" && !strings.Contains(name, "(") { currentContact = &Contact{