Coder Social home page Coder Social logo

node-kickass's Introduction

node-kickass NPM version Build Status

NPM

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

Installation

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

npm install node-kickass --save

Usage

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(errors, data) {
  /*
  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");
  }
})

Functions

  • 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(errors, data) {
            //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()

Disclaimer

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.

node-kickass's People

Contributors

glavin001 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

node-kickass's Issues

Configurable base URL

Will throw problems if kickass.to is blocked by some ISPs. Providing a way for a developer to set the base URL to use would allow them to pull proxy list names and apply them if connections can't be made.

If kickass.to is unavailable feedparser will spit out an error about 'Not a feed'. It's been flagged on node-feedparser, and a user discovered it was caused by an incorrect request and unexpected error handling. Explicitly stating the URL would be good practice.

I believe this would make the module more robust.

Use JSON API

Example request:

GET https://kickass.to/json.php?q=Community&field=seeders&sorter=desc&page=1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.