diff --git a/api/utils_html.go b/api/utils_html.go index 92cbac7..5b66047 100644 --- a/api/utils_html.go +++ b/api/utils_html.go @@ -6,6 +6,10 @@ import ( ) func htmlTitleRecurse(h *html.Node) string { + if h == nil || h.FirstChild == nil { + return "" + } + if h.Type == html.ElementNode && h.Data == "title" { return h.FirstChild.Data }