histoirerurale out of range bug
[016078] 1 [ 8006 - scraped] map["url":"https://www.histoirerurale.ch/pers/personnes/Merki,_Rudolf_(1893_1968)__DB2346.html"] (5m36.083870295s)
[016079] 1 [ 8078 - request] map["url":"https://www.histoirerurale.ch/pers/personnes/6584.html"] (5m36.083948676s)
ES INFO2020/06/30 12:28:28 POST http://elasticsearch-master-headless:9200/metagrid/_doc/ [status:201, request:0.012s]
ES INFO2020/06/30 12:28:28 POST http://elasticsearch-master-headless:9200/metagrid/_search [status:200, request:0.001s]
[016080] 1 [ 8040 - responseHeaders] map["status":"OK" "url":"https://www.histoirerurale.ch/pers/personnes/6030.html"] (5m36.142278395s)
[016081] 1 [ 8038 - response] map["status":"OK" "url":"https://www.histoirerurale.ch/pers/personnes/Mettler,_Alois__DB5872.html"] (5m36.199204642s)
panic: runtime error: index out of range [1] with length 0
goroutine 77 [running]:
metagrid/domains/provider/histoirerurale.(*histoireruraleCollector).OnResponse(0xc0003d0200, 0xc000077180, 0xc0003d0101, 0xfa5de0, 0xc0002728d0, 0xc000096660)
/go/src/source.dodis.ch/metagrid-go/metagid-go/domains/provider/histoirerurale/histoirerurale.go:94 +0x11d2
metagrid/collect.(*Collect).onResponse(0xc0000bbb00, 0xc000077180)
/go/src/source.dodis.ch/metagrid-go/metagid-go/collect/collect.go:135 +0x146
github.com/gocolly/colly/v2.(*Collector).handleOnResponse(0xc0001596c0, 0xc000077180)
/go/pkg/mod/github.com/gocolly/colly/v2@v2.1.0/colly.go:1035 +0x69
github.com/gocolly/colly/v2.(*Collector).fetch(0xc0001596c0, 0xc00014c3c0, 0x36, 0xc00033c600, 0x3, 0x0, 0xf9f300, 0xc000342ea0, 0xc0003fd6e0, 0xc000404990, ...)
/go/pkg/mod/github.com/gocolly/colly/v2@v2.1.0/colly.go:674 +0x46c
github.com/gocolly/colly/v2.(*Collector).scrape(0xc0001596c0, 0xc00014c3c0, 0x36, 0xc00033c600, 0x3, 0x0, 0xf9f300, 0xc000342ea0, 0xc0003fd6e0, 0xc000404990, ...)
/go/pkg/mod/github.com/gocolly/colly/v2@v2.1.0/colly.go:577 +0x47e
github.com/gocolly/colly/v2.(*Request).Do(0xc00007da00, 0xc000125fb8, 0x1)
/go/pkg/mod/github.com/gocolly/colly/v2@v2.1.0/request.go:156 +0x94
github.com/gocolly/colly/v2/queue.independentRunner(0xc000336060, 0xc0003360c0)
/go/pkg/mod/github.com/gocolly/colly/v2@v2.1.0/queue/queue.go:191 +0x3f
created by github.com/gocolly/colly/v2/queue.(*Queue).Run
/go/pkg/mod/github.com/gocolly/colly/v2@v2.1.0/queue/queue.go:135 +0x164
Edited by Tobinsk