             (fn [{:keys [status body error]}]
               (if error
                 (let [{cause :cause} (Throwable->map error)]
-                  (a/put! error-ch (error-message url cause)))
+                  (async/put! error-ch (error-message url cause)))
                 (if (> status 399)
-                  (a/put! error-ch (error-message url status))
-                  (a/put! result-ch (as-hickory (parse body))))))))
+                  (async/put! error-ch (error-message url status))
+                  (async/put! result-ch (as-hickory (parse body))))))))
 
 (defn fetch-yorck-list [result-ch error-ch]
   (async-get (str yorck-base-url "/filme?filter_today=true") result-ch error-ch))

(ns yorck-ratings.core
  (:require [org.httpkit.client :as http]
            [clojure.core.async :as a]
            [hickory.select :as h]
            [clojure.string :as str])
  (:use [hickory.core])
  (:import (java.util.regex Pattern)
           (java.net URLEncoder)))

(defn imdb-rating [dp]
  (try
    (->> dp
         (hickory/select (hickory/descendant
                           (hickory/id :ratings-bar)
                           hickory/first-child
                           (hickory/class :inline-block)))
         first
         :content
         first
