[back/refactor] for -> doseq
This commit is contained in:
parent
270b4d7822
commit
b0c52c2e89
1 changed files with 8 additions and 10 deletions
|
@ -15,13 +15,12 @@
|
|||
[docs]
|
||||
(-> (.select docs "style[data-emotion-css~=^[a-z0-9]*$]")
|
||||
(.remove))
|
||||
(vec
|
||||
(for [a (.select docs "a")]
|
||||
(doseq [a (.select docs "a")]
|
||||
(.attr a "href"
|
||||
(-> (.attr a "href")
|
||||
(str/replace "https://link.zhihu.com/?target=" "")
|
||||
(str/replace "https://zhuanlan.zhihu.com/p/" "#/item/")
|
||||
(url-decode))))))
|
||||
(url-decode)))))
|
||||
|
||||
|
||||
(defn clean-images
|
||||
|
@ -30,9 +29,8 @@
|
|||
(.remove))
|
||||
(-> (.select docs "figure > noscript")
|
||||
(.tagName "div"))
|
||||
(vec
|
||||
(for [img (.select docs "figure > div > img")]
|
||||
(.attr img "loading" "lazy"))))
|
||||
(doseq [img (.select docs "figure > div > img")]
|
||||
(.attr img "loading" "lazy")))
|
||||
|
||||
|
||||
(defn render-linkcard
|
||||
|
|
Loading…
Reference in a new issue