Skip to content
This repository has been archived by the owner on Jun 5, 2018. It is now read-only.

iMilnb/tapib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What's this?

tapib is a trivial RESTful interface to TPB, it permits to search content with a simple REST syntax.

Docker

Using a existing image

$ docker run -d -p 5001:5001 --name tapib humboldtux/tapib

Building and using your own image

$ git clone git@github.com:iMilnb/tapib.git
$ cd tapib
$ docker build -t myusername/tapib .
$ docker run -d -p 5001:5001 --name tapib myusername/tapib

Usage

Start the webservice:

$ python tapib.py

Query the service:

$ curl localhost:5001/s/all/debian

Possible filters are:

  • categories: localhost:5001/cats
  • top: localhost:5001/top/applications:unix
  • search: localhost:5001/s/all/free software
  • search and sort: localhost:5001/s/video:movies/public domain/size:asc

Sort filters are composed of name, uploaded, size, seeders, leechers, uploader and type. Each filter must be associated with a des (decreasing) or asc (increasing) parameter. For example:

$ curl "localhost:5001/s/audio:music/public domain/leechers:des"

will display results for "public domain" in the audio:music section by leechers ordering the search from the most to the lesser.
Default order is seeders:des

Requirements

  • pip install ThePirateBay
  • pip install dateutils
  • pip install lxml
  • pip install Flask-RESTful

About

Trivial RESTful interface to TPB - Moved to https://gitlab.com/iMil

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages