Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Look for errors in the page.

  • Loading branch information...
commit 5798e5b1f52f55eb66ddd1c279a3bacf59aecb03 1 parent c7d4aa4
@Raynes authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/lazybot/plugins/metacritic.clj
View
4 src/lazybot/plugins/metacritic.clj
@@ -17,7 +17,9 @@
(defn metacritic [args]
(let [[type & args] args
path (str url (paths type) (normalize args))]
- (if-let [html (try (l/parse (slurp path))
+ (if-let [html (try (let [html (l/parse (slurp path))]
+ (when-not (seq (l/select html (l/class= "error_code")))
+ html))
(catch Exception _))]
(let [[critic user] (map (comp l/text first)
[(l/select html
Please sign in to comment.
Something went wrong with that request. Please try again.