diff --git a/src/rsspaper/feeds.clj b/src/rsspaper/feeds.clj index a75369b..02839a9 100644 --- a/src/rsspaper/feeds.clj +++ b/src/rsspaper/feeds.clj @@ -42,8 +42,8 @@ (map (fn [article] (let [url-article (get-in article [:feed :link]) html (:body (client/get url-article {:insecure? true})) - first-content (second (re-find #"].*[^>]content=\"([^\">]+)\".*[^>]property=\"og:image(?::url)?\".*>" html)) - second-content (second (re-find #"].*[^>]property=\"og:image(?::url)?\".*[^>]content=\"([^\">]+)\".*>" html)) + first-content (second (re-find #"^]+)\".*property=\"og:image(?::url)?\".*>$" html)) + second-content (second (re-find #"^]+)\".*>$" html)) first-image (second (re-find #"]+src=\"([^\">]+)\"" html)) images [first-content second-content first-image] final-image (first (filter (fn [item] (not (nil? item))) images))]