Nyaa API written in Python
Project description
Nyaax - Nyaa API written in Python
Installation
Nyaax is available on Pypi so you can install it using pip
pip install nyaax
API
Six methods are available to use:
- get_view
- get_description
- get_single_torrent
- get_comments
- get_multiple_torrents
- get_multiple_torrents_rss
(Working on get_file_tree)
To use them, import the module 'extractors':
import requests
from nyaax import extractors as ex
rs = requests.get("https://nyaa.si/?f=0&c=0_0&q=Initial+D")
torrents = ex.get_multiple_torrents(rs)
# torrents -> [Torrent(seeders=10, code=2, ...), Torrent(info_hash=..., ...), ...]
Each method is responsible for extracting data from a particular page or a portion of it. Below is a brief description of the methods currently available and from which URLs they extract the data.
[https://nyaa.si/view/...]
- get_view -> View
- get_description -> str
- get_single_torrent -> Torrent
- get_comments -> list[Comment]
[https://nyaa.si/?q=...]
- get_multiple_torrents -> list[Torrent]
[https://nyaa.si/?page=rss&q=...]
- get_multiple_torrents_rss -> list[Torrent]
Below is a description of the objects returned by the 'extractors' module functions:
Torrent:
- size: int
- date: datetime
- seeders: int
- leechers: int
- completed_downloads: int
- category: str
- subcategory: str
- title: str
- code: int
- magnet_link: str
- comments: int
- torrent_type: str | None
- information: str | None
- info_hash: str | None
- submitter: User | None
User:
- name: str
- trusted: bool
View:
- torrent: Torrent
- description: str
- comments: list[Comment]
Comment:
- user: User
- date: str
- text: str
- avatar: str | None
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 nyaax-0.1.2.tar.gz.
File metadata
- Download URL: nyaax-0.1.2.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c109e4040046d3d58b09a7c9728c445d9b97ceebe5946ce8fc2e51dc4bec3716
|
|
| MD5 |
37c16dac1a67d2e81ad9efb169b7c2ef
|
|
| BLAKE2b-256 |
6d2ce8a9c10eca19078eab9dc3548d65a9443338a3e474c6f5496c9901a805c4
|
Provenance
The following attestation bundles were made for nyaax-0.1.2.tar.gz:
Publisher:
cd.yml on gensimone/nyaax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nyaax-0.1.2.tar.gz -
Subject digest:
c109e4040046d3d58b09a7c9728c445d9b97ceebe5946ce8fc2e51dc4bec3716 - Sigstore transparency entry: 757415275
- Sigstore integration time:
-
Permalink:
gensimone/nyaax@fa6565c5abf55ee31d938490f588637406fdde1c -
Branch / Tag:
refs/tags/0.1.2 - Owner: https://github.com/gensimone
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@fa6565c5abf55ee31d938490f588637406fdde1c -
Trigger Event:
push
-
Statement type:
File details
Details for the file nyaax-0.1.2-py3-none-any.whl.
File metadata
- Download URL: nyaax-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3cae19fc97b7562262a59b35f988f02366eb1960276695b32c111077ddec741
|
|
| MD5 |
614764dd8c9a9d991d075d4732d1154e
|
|
| BLAKE2b-256 |
0c873ab71551782c6e01edf5c891c38d84f6504782bce0768634195d5d2dc36b
|
Provenance
The following attestation bundles were made for nyaax-0.1.2-py3-none-any.whl:
Publisher:
cd.yml on gensimone/nyaax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nyaax-0.1.2-py3-none-any.whl -
Subject digest:
a3cae19fc97b7562262a59b35f988f02366eb1960276695b32c111077ddec741 - Sigstore transparency entry: 757415296
- Sigstore integration time:
-
Permalink:
gensimone/nyaax@fa6565c5abf55ee31d938490f588637406fdde1c -
Branch / Tag:
refs/tags/0.1.2 - Owner: https://github.com/gensimone
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@fa6565c5abf55ee31d938490f588637406fdde1c -
Trigger Event:
push
-
Statement type: