node-kickass

Query for torrents at Kickass.to with Node.js.

node-kickass

Query for torrents at Kickass.to with Node.js.

Add node-kickass to your existing Node.js project.

npm install node-kickass --save

See examples for more usage details.

Built as a Fluent Interface. Also known as method chaining, as used in jQuery.

var Kickass = require('node-kickass');
 
var k = new Kickass()
.setQuery('Almost Human')   // Set search Query parameter  
.setPage(0)                 // Optional 
.run(function(errorsdata) {
  /*
  this  {context} => Current Context is set to be `k`.
  errors  {array} => An array of errors that occured.
  data    {array} => An array of items/articles that were read.
  */
  if (! errors.length > 0) {
    // No errors occured. 
    console.log(data.length, "results");
    console.log(
      errors,     // Array of errors, will be empty array given there are no errors. 
      data,       // Array of items/articles read from this `run`. 
      this.items  // Array of all items/articles read that have been associated to `k`, which is the current context `this`. 
      );
  } else {
    // One or more errors occured. 
    console.log(errors, "errors");
  }
})
 
  • constructor
var k = new Kickass()
  • setQuery
k.setQuery("Search Name")
  • setPage
k.setPage(0)
  • setSort
k.setSort({
  field: "seeders",
  sorder: "desc"
});
  • run
k.run(function(errorsdata) {
            //console.log(data); 
            if (! errors.length > 0) {
                done();
                //console.log(data.length); 
            } else {
                //console.log(errors); 
            }
        });
  • wait (FIXME) Waits for all requests to be completed.
k.wait()

There are obvious legal issues, with downloading copyrighted material you do not have a license for. We do not endorse such use cases and take no responsibility for the use people make of it.