A PirateBay API wrapper
Project description
PirateBay.py
This project is intended to be an API wrapper for apibay & ThePirateBay (only the 'main.js' file for the trackers)
How does it works?
The functionality of this project is very easy to understand, as it's composed by a set of methods that point directly to the PirateBay API (apibay) with the sole purpose of parsing the response for the coder to then use it.
Installation
You can install this project by running the following commands:
pip install PirateBayAPI
# OR
pip install .
A very simple example that searchs "The Tomorrow War" in the Video.Movies category and prints results
import PirateBayAPI
import typing
# Static Typing isn't required (but recomended)
results: typing.List[PirateBayAPI.SearchElement] = PirateBayAPI.Search(
"The Tomorrow War", PirateBayAPI.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 magnet link (necessary to download) of the first result of the search
import PirateBayAPI
import typing
# Static Typing isn't required (but recomended)
results: typing.List[PirateBayAPI.SearchElement] = PirateBayAPI.Search(
"The Tomorrow War", PirateBayAPI.VideoType.Movies)
print("Download Link: {} (size:{}.Mb)".format(
PirateBayAPI.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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file piratebayapi-1.0.1.tar.gz.
File metadata
- Download URL: piratebayapi-1.0.1.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae85903e1697c8a05a91a4be050fe6e92b8dd7a950338fa31f067888934e0d79
|
|
| MD5 |
983a3624a1a1ca06d7909bf83e53ff64
|
|
| BLAKE2b-256 |
7d938c758e9f08feb3a1c44de2bd23278ca3d9c0701a55091e11677df9cb1bca
|
File details
Details for the file PirateBayAPI-1.0.1-py3-none-any.whl.
File metadata
- Download URL: PirateBayAPI-1.0.1-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11f0d465a84ab9ad6722962466e7e83c3dd226797ca6ef9ce8ed94d03db8d27c
|
|
| MD5 |
3d2adbc0a8f2a15d468e113a4b2bb151
|
|
| BLAKE2b-256 |
7b5a76f30e478a327e5fd3dbe340e6cd74e75fe7decf22f3afe1735e601a972c
|