diff options
Diffstat (limited to 'hn')
-rwxr-xr-x | hn/g | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -14,6 +14,7 @@ (require openssl) (require html-parsing) +(require sxml) (require sxml/sxpath) @@ -34,3 +35,8 @@ (s (sxpath "//tr[@class=\"athing\"]"))) (take (s x) 20))) +(define (athing:id a) + (let ((id (sxml:attr a 'id))) + (if (empty? id) (error "athing:id: Unable to get id") + id))) + |