                   {url :href} :attrs}]
   {:name ((link-name-normalize) name)
    :url  ((link-url-normalize)  url)})
+
+(defn comic-link-add-id [{:keys [url] :as comic-map}]
+  (let [[_ data] (re-find (manga-pattern) url)]
+    (assoc comic-map
+           :id data)))
+
+(defn comic-link-normalize [link]
+  (-> link
+      link->map
+      comic-link-add-id))
+
+(defn extract-comics-list [html]
+  (scrape/extract-list html
+                       (comic-list-selector)
+                       comic-link-normalize))
+
+(defn get-comic-list []
+  (-> (manga-list-url)
+      scrape/fetch-url
+      extract-comics-list))
+
+
+;; ############################################################
+;; ## Get Chapter List functions
+;; ############################################################
+
+(defn chapter-link-add-ch-num [{:keys [url]
+                                :as comic-map}]
+  (let [[_ data] (re-find (chapter-number-match-pattern) url)]
+    (assoc comic-map
+           :ch-num (safe-read-string data))))
+
+(defn chapter-link-normalize [link]
+  (-> link
+      link->map
+      chapter-link-add-ch-num))
+
+(defn extract-chapters-list [html comic-url]
+  (scrape/extract-list html
+                       (chapter-list-selector)
+                       chapter-link-normalize))
+
+(defn comic->url [comic-id]
+  (format (comic->url-format) (manga-url) comic-id))
+
+(defn get-chapter-list [comic-id]
+  (let [comic-url (comic->url comic-id)]
+    (-> comic-url
+        scrape/fetch-url
+        (extract-chapters-list comic-url))))
+
+
+;; ############################################################
+;; ## Get Page List functions
+;; ############################################################
 
 (defn extract-image-tag [html]
   (scrape/extract-image-tag html (image-selector)))


;;; Real functions

(defn manga-url []
  (format (manga-url-format) (root-url)))


                         (page-list-selector)
                         normalize)))

(defn get-page-list [comic-chapter]
  (let [chapter-url (:url comic-chapter)]
    (-> chapter-url
        scrape/fetch-url
        (extract-pages-list chapter-url))))


;; ############################################################
;; ## Get Image Data functions
;; ############################################################

(defn get-image-data [comic-id chapter page]
  [])
