Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No filter documentation #55

Open
superlazer opened this issue Apr 12, 2021 · 1 comment
Open

No filter documentation #55

superlazer opened this issue Apr 12, 2021 · 1 comment
Assignees
Labels

Comments

@superlazer
Copy link

I would really appreciate it if I could see the filter list to know what I can filter. Right now it is just an empty doc.

Cheers

@JuanjoSalvador JuanjoSalvador self-assigned this Apr 12, 2021
@JuanjoSalvador
Copy link
Owner

I was postponing writing the docs for a long time, because I didn't know this project has actual users. So I'm going to write them along this week, I promise. Also there is a lot of new and undocumented features, and lot of outdated/deprecated ones.

The filters are basically three:

0 - No filter (default)
1 - No remakes
2 - Trusted only

So if you want to search for Kimi No Na Wa for example at Nyaa.si but you only want trusted results, you can use

from NyaaPy.nyaa import Nyaa

# Initialize Nyaa object
nyaa = Nyaa()

# Search for `Kimi No Na Wa` at Nyaa
nyaa.search("kimi no na wa", filters=2)

Which is an equivalent to make a request to https://nyaa.si/?f=2&c=0_0&q=Kimi+No+Na+Wa. Notice f=2 into the URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants