From 6cd4f1d99cac935f4f6eaa477428478f8792fe7a Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Sat, 26 Dec 2020 07:16:20 +0100 Subject: [PATCH] fix: ignoring buggy columns, enlarged columns --- src/qrz/main.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qrz/main.go b/src/qrz/main.go index 21a7ff6..65a8999 100644 --- a/src/qrz/main.go +++ b/src/qrz/main.go @@ -96,7 +96,7 @@ func getFrsEntries(config config.Config, body string) (frsentries map[string]Qrz for _, n := range htmlquery.Find(htmlpage, "//tr") { td := htmlquery.Find(n, "//td") - if len(td) > 2 { + if len(td) >= 6 { if re.MatchString(htmlquery.InnerText(td[1])) { frs := Qrz{ QRZ: strings.TrimLeft(htmlquery.InnerText(td[1]), " "), @@ -196,12 +196,12 @@ func ToSlice(qrz Qrz) (out []string) { // Qrz describe FRS people type Qrz struct { ID int `db:"id" xorm:"pk autoincr"` - QRZ string `db:"qrz" xorm:"varchar(25) notnull"` - Name string `db:"name" xorm:"varchar(25) notnull"` + QRZ string `db:"qrz" xorm:"varchar(50) notnull"` + Name string `db:"name" xorm:"varchar(50) notnull"` Address string `db:"address" xorm:"varchar(50) notnull"` City string `db:"city" xorm:"varchar(50) notnull"` Zipcode string `db:"zipcode" xorm:"varchar(5) notnull"` - Dept string `db:"dept" xorm:"varchar(25) notnull"` - Country string `db:"country" xorm:"varchar(25) notnull"` - DMRID string `db:"dmrid" xorm:"varchar(25) notnull"` + Dept string `db:"dept" xorm:"varchar(50) notnull"` + Country string `db:"country" xorm:"varchar(50) notnull"` + DMRID string `db:"dmrid" xorm:"varchar(50) notnull"` }