A PirateBay API wrapper
Project description
PirateBay.py
This project is intended to be an API wrapper for apibay & ThePirateBay(only main.js for the trackers)
How it works
It's own functionality is very easy to understand, its composed by a set of function's that points directly to the PirateBay API (apibay) and parses the response for the programmer.
A very simple example that search's "The Tomorrow War" in the Video.Movies category and prints result's
import PirateBay
import typing
# Static Typing isn't required (but recomended)
results: typing.List[PirateBay.SearchElement] = PirateBay.Search(
"The Tomorrow War", PirateBay.VideoType.Movies)
for result in results:
print("File: {} {}.Mb (id:{})".format(
result.name, round(result.size/1024/1024, 2), result.id))
Another example, in this case, we get the download magnet link from the first result of the search
import PirateBay
import typing
# Static Typing isn't required (but recomended)
results: typing.List[PirateBay.SearchElement] = PirateBay.Search(
"The Tomorrow War", PirateBay.VideoType.Movies)
print("Download Link: {} (size:{}.Mb)".format(
PirateBay.Download(results[0].id), round(results[0].size/1024/1024, 2)))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
PirateBayAPI-1.0.0.tar.gz
(4.4 kB
view details)
Built Distribution
File details
Details for the file PirateBayAPI-1.0.0.tar.gz
.
File metadata
- Download URL: PirateBayAPI-1.0.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f59ac4758fddcde689724824ccb91bb574b4b9915b9c9d5c242d860494976b6 |
|
MD5 | e60fc834a72d6ea6de8bc39a26364c00 |
|
BLAKE2b-256 | 78fb04df465f915c3b597f7889838f2992a48fa314037a0291a5b817be599d34 |
File details
Details for the file PirateBayAPI-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: PirateBayAPI-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7020928b5ec15bd72460f056fa2979730f66c7e15df7c3af9aed1512516a6a6 |
|
MD5 | 3461db4a26c4f53b160bc82f25f7c1be |
|
BLAKE2b-256 | 71e1107b3361da789ebdc3a23d0ebefc49ceb724179075f8ff5ca1770d927910 |