Giter Club home page Giter Club logo

ktorrent's Introduction

โš ๏ธ On 20 July 2016, KAT domain was seized by the United States government and is offline.

kTorrent

version version supported Build Status

A Python module to fetch and parse data from Kickass Torrents.

Install

Using pip

$ pip install ktorrent

Build from source

$ git clone https://github.com/codenirvana/kTorrent.git
$ cd kTorrent
$ python setup.py install

Usage

Search

import ktorrent

# Basic Search
search = ktorrent.search(search='Linux')

# Complex Search
search = ktorrent.search(search='Linux Shell script', strict=1, category='books', field='age', sorder='desc', page=2)
Function Parameters
  • search = 'search query'
  • strict = 'search strictness' [int]
  • safe = 'family safety filter' [int]
  • verified = 'only verified torrents' [int]
  • subtract = 'Subtract specified word(s)'
  • user = 'Uploads by certain user'
  • category = 'torrent category'
  • field = 'select field to sort results'
  • sorder = 'sorting order'
  • page = 'page number' [int]

Required: search

Valid Parameters Values
  • Search Result Ordering

    category field sorder
    all size asc
    movies files desc
    tv age
    anime seed
    music leech
    books
    applications
    games
    other
    xxx
  • Search Filters

    value strict safe verified
    -1   | fuzzy  |   -  |    -
    0    | normal |   -  |    -
    1    | strict | yes  |   yes
    
  • subtract : Space separated, ... subtract='book reference'...

  • user : Single user/uploader name

Top

import ktorrent

# Top books
top_books = ktorrent.top(category='books')

# Top movies
top_movies = ktorrent.top(category='movies', page=2)
Function Parameters
  • category = 'torrent category'
  • page = 'page number' [int]

Required: category

Valid Parameters Values
  • Categories available

    movies, tv, anime, music, books, applications, games, other, xxx

Output

JSON formatted search results, structure:

{  
   "status" : 200,
   "meta":{  
      "pageCurrent" : 1,
      "pageResult"  : 25,
      "pageTotal"   : 10
   },
   "torrent":[  
      {  
         "age"      : "",
         "category" : "",
         "files"    : "",
         "leech"    : "",
         "link"     : "",
         "magnet"   : "",
         "name"     : "",
         "seed"     : "",
         "size"     : "",
         "verified" : "",
         "web"      : ""
      }
    ]
}
status Description
200 SUCCESS
400 BAD REQUEST invalid function parameters
404 NOT FOUND
408 TIME OUT server error

Licence

Open sourced under MIT License

ktorrent's People

Contributors

bitdeli-chef avatar codenirvana avatar

Watchers

 avatar  avatar  avatar

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.