       url.substring(0, HTTP.length) isnt HTTP
     url = BASE_URL + url
 
-  new Promise (resolve, inject) ->
+  new Promise (resolve, reject) ->
 
     phantom.create().then (ph) ->
 

                for read_more in document.getElementsByClassName("read-more")
                  read_more.firstElementChild.click()

                document.body.dataset.youtubeCommentScraper = READY

          .then ->
            # Check data-youtube-comment-scraper is ready, which means all pages
            # are loaded and all collapsed comments are expanded.
            # If not, wait more 1000 msec.
            new Promise (resolve, _) ->
              do get_body = ->
                page.evaluate ->
                  if document.body.dataset.youtubeCommentScraper is READY
                    document.body.innerHTML
                .then (html) ->
                  if html
                    resolve html
                  else
                    setTimeout get_body, 1000

          .then (html) ->
            $ = cheerio.load html

            page.close()
            ph.exit()
            reject reason

      .catch (resaon) ->
        ph.exit()
        reject reason

    .catch (reason) ->
      reject reason
