about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorAlan Pearce2014-09-24 13:30:11 +0100
committerAlan Pearce2014-09-24 13:30:11 +0100
commit2b01c9e53ded6e44d75b45fe955f00b79f3ef75e (patch)
tree090f27fbbbbae5e78ff10119a79d7be4951069dd /src
parentcdf600e89d0008ea42eaa60cc7b3abf0a18acff2 (diff)
downloadmicroformats-2b01c9e53ded6e44d75b45fe955f00b79f3ef75e.tar.lz
microformats-2b01c9e53ded6e44d75b45fe955f00b79f3ef75e.tar.zst
microformats-2b01c9e53ded6e44d75b45fe955f00b79f3ef75e.zip
Parse child implied URLs
Diffstat (limited to 'src')
-rw-r--r--src/microformats/parser.clj3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/microformats/parser.clj b/src/microformats/parser.clj
index ab14cd6..5786f7c 100644
--- a/src/microformats/parser.clj
+++ b/src/microformats/parser.clj
@@ -192,7 +192,8 @@
   [element]
   (case (:tag element)
     :a (-> element :attrs :href)
-    nil))
+    (if-let [% (first (html/select element [html/root :> [:a (html/attr? :href) html/only-of-type (html/but-node (html/attr-contains :class "h-"))]]))]
+      (-> % :attrs :href))))
 
 (defn- parse-implied-photo
   [element]