Browse files

Look for errors in the page.

  • Loading branch information...
1 parent c7d4aa4 commit 5798e5b1f52f55eb66ddd1c279a3bacf59aecb03 @Raynes committed Feb 17, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 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

0 comments on commit 5798e5b

Please sign in to comment.