Giter Site home page Giter Site logo

janardannn / kickasstorrentsapi Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 14 KB

This is a unofficial API for KickassTorrents. This API can be used to search for torrents in KickassTorrents and to retrive magnet links for torrents.

License: MIT License

Python 100.00%
torrent python api kickass-api

kickasstorrentsapi's Introduction

ABOUT

This is an unofficial API for KickassTorrents.

Installation

pip install -r requirements.txt

Usage

Search for torrents using the API

from KickAssAPI import KickAssAPI

api = KickAssAPI()
results = api.search("Attack on Titan")

for key in results:
    print(results[key]['title'])
    print(results[key]['page_url'])

Get the magent link of a selected torrent from search results

from KickAssAPI import KickAssAPI

api = KickAssAPI()
results = api.search("Attack on Titan")

magnet_link  = api.magnet(results[index]['page_url'])
print(magnet_link)

API

Using the API deployed on Heroku

Searching for torrents using the API

import requests, json

API_SEARCH = "https://kickass-api-unofficial.herokuapp.com/search?torrent="

resp = requests.get(API_SEARCH + "Attack on titan")
results = json.loads(resp.text)

for key in results:
    print(results[key]['title'])
    print(results[key]['page_url'])

Getting magnet links using the API

import requests, json

API_MAGNET = "https://kickass-api-unofficial.herokuapp.com/magnet?page_url="

page_url = results[index]['page_url']
resp = requests.get(API_MAGNET+page_url)

magnet = json.loads(resp.text)

magnet_link = magnet['magnet']

kickasstorrentsapi's People

Contributors

janardannn avatar

Stargazers

 avatar

Watchers

 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.