mirror of
https://github.com/tanrax/RSSPAPER.git
synced 2025-02-28 05:49:19 -05:00
Fix exception and update version 1.1.3
This commit is contained in:
parent
359b88cbc0
commit
b9dae2812d
@ -1,4 +1,4 @@
|
|||||||
(defproject rsspaper "1.1.2"
|
(defproject rsspaper "1.1.3"
|
||||||
:description "RSSpaper"
|
:description "RSSpaper"
|
||||||
:url "https://github.com/tanrax/RSSpaper"
|
:url "https://github.com/tanrax/RSSpaper"
|
||||||
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
|
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
(prn (str "Looking for cover image for article > " (:link article)))
|
(prn (str "Looking for cover image for article > " (:link article)))
|
||||||
; Search cover image
|
; Search cover image
|
||||||
(let [url-article (:link article)
|
(let [url-article (:link article)
|
||||||
html (:body (client/get url-article {:insecure? true}))
|
html (:body (client/get url-article {:insecure? true :throw-exceptions false}))
|
||||||
url-og-image (second (re-find #"<meta[^>].*?property=\"og:image(?::url)?\".*?content=\"(.*?)\".*?>|<meta[^>].*?content=\"(.*?)\".*?property=\"og:image(?::url)?\".*?>" html))
|
url-og-image (second (re-find #"<meta[^>].*?property=\"og:image(?::url)?\".*?content=\"(.*?)\".*?>|<meta[^>].*?content=\"(.*?)\".*?property=\"og:image(?::url)?\".*?>" html))
|
||||||
url-first-image (second (re-find #"<main.*>[\s\S]+<img[^>]+src=\"([^\">]+)\"|id=['\"] ?main ?['\"]>[\s\S]+<img[^>]+src=\"([^\">]+)\"|class=['\"] ?main ?[\'\"]>[\s\S]+<img[^>]+src=\"([^\">]+)\"" html))
|
url-first-image (second (re-find #"<main.*>[\s\S]+<img[^>]+src=\"([^\">]+)\"|id=['\"] ?main ?['\"]>[\s\S]+<img[^>]+src=\"([^\">]+)\"|class=['\"] ?main ?[\'\"]>[\s\S]+<img[^>]+src=\"([^\">]+)\"" html))
|
||||||
images [url-og-image url-first-image]
|
images [url-og-image url-first-image]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user