MadeOfMagicAndWires/qBit-plugins

having issues with Nyaa.si plugin

andku85 opened this issue · 9 comments

I saw that there was a closed ticket on this and they didn't provide info.
Windows 11 64bit
qbittorent 4.5.2 64bit
python 3.11.3 64bit every search needs a specific version is kinda nuts. most of the times should be backwards compatible.
line modified
qbittorrent - file
search
qbittorrent - search
from site
qbittorrent - search nyaa

Hey there, thanks for your feedback.

I don't own a Windows machine, so I can't personally replicate this. If you could try two things for me:

  • this is probably not the issue but could you try replacing all the line breaks (indicated by LF in your text editor) with dos formatted carriage returns? Find & Replace or a tool called unix2dos should be able to do this for you.

  • Could you follow these steps and let me know if it returns any output? If it doesn't I can work on a debug version that might.

Sorry about all the extra work, but like you said, there shouldn't be any obvious reason on why the plugin shouldn't be compatible that I can think of.

so yea no luck. even in the debug. unless i am doing something wrong.
in the one screen shot what concerns me is that when running nova2.py it looks like it list the engines but shows up blank.

changed line breaks
new line breaks
python commands in power shell
debug
list from engines in qbittorent
engines

Same issue as OP. Looks like it's something the ISP is doing at least for as I can't access nyaa without a VPN, usually cloudflare works but it's mostly not helpful. Just used a VPN and search results started showing

That is interesting. I have my qbittorent currently locked to only use vpn. see picture. and still cannot search with nyaa.si

image

@andku85
Hey there, sorry for the lack of reply. After looking at the screenshot of your setup, I noticed the nova2.py script doesn't recognize your engine files, since the directory layout is a bit different. For testing the nova2.py and related scripts should be in the parent directory of the engines directory, for example:

__init__.py  
__pycache__  
engines  
engines/nyaasi.py
...
helpers.py  
nova2.py  
nova2dl.py  
novaprinter.py  
sgmllib3.py  
socks.py  

If set up this way the output of the nova2.py script without arguments should list all the installed search engines files (something like this):

$ python nova2.py
./nova2.py [all|engine1[,engine2]*] <category> <keywords>
available engines: academictorrents, acgrip,  kickasstorrents, nyaasi, one1337x, thepiratebay

Let me know if that changes anything, and thanks for your help

Here you go. i tired the nyaasi and pirate bay. it seems there is a cert failure.

image

Interesting, from what I'd have to guess either your machine can't verify the nyaa.si HTTPS certificate or thinks it has expired, or maybe your root certificates have expired. From what I can gather the nyaa.si certificate has not expired so it might be the root certificate? It'd be weird for your issues to be localized to nyaa though.

Unfortunately, this isn't something I can fix in the plugin as that doesn't directly handle those things (and also I don't have your local machine). I can give you some things to try however:

One thing you can try to do is install/update the python certifi package, which should update root certificates if they aren't already up to date. To do so, please run:
pip install –upgrade certifi

If this doesn't help you could try these steps to manually install the latest certificate of nyaa.si (also available here).

If neither of these things work one last ditch effort would be to download this sukebei plugin change the base_url variable on line 27 to:

    base_url = 'https://nyaa.si/?q=%s&f=0&c=0_0'

and either install it through qBittorrent or save it to the engines directory and try it out. If that plugin does work and mine doesn't the issue is with my plugin and I can try to figure out what the issue is. Otherwise I'm afraid I'm out of tricks, and you'd have to try and take it up with qBittorrent, as their helpers.py script actually handles the HTTP requests.

Hopefully one of the earlier methods works though, let me know

So manually installing the cert worked for me. I downloaded the PEM and double clicked installed local machine and re ran the nova2.py. and then i checked in the client and also worked there. so curious to why only this one causing me issues.

ty

This worked
If this doesn't help you could try these steps to manually install the latest certificate of nyaa.si (also available here).

image

image

Nice.

Yeah, I have no idea what caused the certificate to be out-of-date (but seems unrelated to the plugin), but glad to hear it's fixed. I'll close this issue for now then, but if you come across other issues (or figure out what the root cause was) feel fry to let me know.

Cheers!