From 3218cc40697c57b31159293bc2dbefefddfd41d3 Mon Sep 17 00:00:00 2001 From: Zed Date: Sat, 19 Oct 2019 21:46:16 +0200 Subject: [PATCH] Fix nil card url crash --- src/parser.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser.nim b/src/parser.nim index e822e48..94adff1 100644 --- a/src/parser.nim +++ b/src/parser.nim @@ -254,7 +254,7 @@ proc parseCard*(card: var Card; node: XmlNode) = card.dest = node.selectText("span.SummaryCard-destination") if card.url.len == 0: - card.url = node.select("a").attr("href") + card.url = node.selectAttr("a", "href") let image = node.select(".tcu-imageWrapper img") if image != nil: