pystardust / ani-cli

A cli tool to browse and play anime
GNU General Public License v3.0
7.38k stars 529 forks source link

”No results found!” on Windows 11 #1240

Closed fakedeltatime closed 6 months ago

fakedeltatime commented 7 months ago

Metadata (please complete the following information) Version: 4.60 OS: Windows 11 Shell: git bash inside Windows Preview Terminal Anime: any, e.g. flcl

Describe the bug Searching or trying to download anime errors out with the message ”No results found!”

Steps To Reproduce

  1. Run ani-cli -d flcl

Expected behavior Searching anime should work

port19x commented 7 months ago

Possible related to #1228

Acrossy commented 7 months ago

Hello, I'm new here but I would also like to report on the same issue but on Windows 10.

I installed Ani-Cli today on windows 10 with all the necessary dependencies and like OP, I also ran it through Git Bash in Terminal, but I am also facing the same issue where I always get "No results found" whenever I try to search for an anime.

At first I thought it could be Windows Defender blocking something on the script but even with Defender turned off, the issue persists and I have no idea what could possibly be causing it.

joeky888 commented 7 months ago

Maybe it is blocked by countries or IPs, try switching to another IP. One of my VPN servers in Hong Kong was blocked a few months ago.

Acrossy commented 7 months ago

Maybe it is blocked by countries or IPs, try switching to another IP. One of my VPN servers in Hong Kong was blocked a few months ago.

I tried using ProtonVPN to test that out since they have free servers but sadly the same problem persists on both a Netherlands and Poland servers. I can confirm that I was connected to both since the public ip shown were routing to those 2 countries 2023-11-27 - 8 2023-11-27 - 9

Edit: I also tried on a JP and US servers and same thing.

joeky888 commented 7 months ago

I just downloaded ProtonVPN and connected to the free Netherlands server (169.150.218.59), and ani-cli works as expected. I also tried JP and US, and both work as well.

CoolnsX commented 7 months ago

sometimes maybe the anti-virus blocks the requests, if you are using a paid anti-virus, as mentioned in this video -- https://www.youtube.com/watch?v=iXitG8wzIEs

Acrossy commented 7 months ago

I just downloaded ProtonVPN and connected to the free Netherlands server (169.150.218.59), and ani-cli works as expected. I also tried JP and US, and both work as well.

Damn it, I don't know what I'm doing wrong then, or if I am missing something :(

Oh well... thank you for trying to help. If I manage to find something out I'll share but I'm honestly out of ideas to try.

No AVs, No Firewalls (the only AV/FW I use are the windows defender and the TP-link router's Firewalls), VPNs... nothing worked for me so far, so, i don't know what to try

CoolnsX commented 7 months ago

I found one thing from my morning testing, but it needs the direct edit to script itself

CoolnsX commented 7 months ago

basically you have to remove some lines of code from the script

Edit: this can be a potential fix, as I tested it with searching and it returned results

Acrossy commented 7 months ago

basically you have to remove some lines of code from the script

Edit: this can be a potential fix, as I tested it with searching and it returned results

If you give me the details and tell me which specific file to edit I am willing to also try it out :)

CoolnsX commented 7 months ago

https://oshi.at/mGur/ani-cli

I modified and removed those code-blocks, can you test it?

just run this below code in your git-bash for downloading

curl -s "https://oshi.at/mGur/ani-cli" -o ani-cli && chmod +x ani-cli

and check it like this --

./ani-cli
Acrossy commented 7 months ago

https://oshi.at/mGur/ani-cli

I modified and removed those code-blocks, can you test it?

just run this below code in your git-bash for downloading

curl -s "https://oshi.at/mGur/ani-cli" -o ani-cli && chmod +x ani-cli

and check it like this --

./ani-cli

This worked! Takes a little while like a few seconds to fetch the info and the links but it does work! Can also confirm that going by "ani-cli" does not work, it has to be specifically ./ani-cli or ./ani-cli name-of-anime-here like you advised :) Thank you!

Out of curiosity tho I have the ani-cli file opened in VSCode and was really curious as to what was causing the issue? What did you remove exactly? Was it something related to the inputs not being recognized? Was it something about the way the queries were being processed? I'm genuinely curious :x

2023-11-27 - 10

CoolnsX commented 7 months ago

removed the ciphers arg from curl command, basically curl in git bash has limited scope and doesn't have ciphers like in linux or any unix-based operating system. And as I was testing in the morning, causes many people had this same issue, so I had to enable curl debug, which showed that it doesn't support any user specified ciphers.

cipher arg is one of the strategic disguising techniques to let the website know that request is coming from real browser. this helps the script from not getting blocked.

CoolnsX commented 7 months ago

now you have to install it to the path, so that you can able to use it like ani-cli instead of ./ani-cli

did you installed it from scoop, right?

Acrossy commented 7 months ago

now you have to install it to the path, so that you can able to use it like ani-cli instead of ./ani-cli

did you installed it from scoop, right?

yes, I basically followed the steps in the video link you posted above actually! XD

Ok so I assume this is not a permanent fix, so, what do I need to do or change in order make this permanent?

Or in case it is permanent, I can live with just typing ./ani-cli name-of-anime! Very small price to pay for how convinent this is for sure :)

Edit: I am currently only at 10mbps of average internet speed because bad weather making my mobile hotspot having a bad signal but even so... other than the fetchings for links taking like between 10~20 seconds tops, after the episode starts playing, it runs 100% smooth no stutters! Even with me massively skipping back and foward to test it out, it almost imediatly catches up and starts caching!

This is beautiful! Thank you so much! 2023-11-27 - 11

CoolnsX commented 7 months ago

the link fetching is windows-only issue, it's not your internet problem, it's a long story. it takes the same amount on mine, even though I have half-gigabit internet

Acrossy commented 7 months ago

I see, out of curiosity tho, so in theory there's no need for me to actually add "it" to the path just for the sake of using the "ani-cli" command instead of "./ani-cli", right?

Edit: Also, since you removed the cypher args, It would seem I would need to handle the requests and queries in a certain "moderation" to avoid triggering block checks then?

CoolnsX commented 7 months ago

nah, it won't be a problem, as I said " it is one of the techniques", removing it won't be a problem and need not to worry about

Acrossy commented 7 months ago

nah, it won't be a problem, as I said " it is one of the techniques", removing it won't be a problem and need not to worry about

Alright then! Once again thank you so much for your help regarding this issue! :)

Edit: OH, I now see why you told me to move it to the PATH... silly me, I didn't realize "./" means from current directory... lulz Fixed that. TYSM once again!

idlukakas commented 7 months ago

Should be removed it if the current os it's windows: --cipher "AES256-SHA256"

ArekkusuMagni commented 6 months ago

now you have to install it to the path, so that you can able to use it like ani-cli instead of ./ani-cli

did you installed it from scoop, right?

So what is the command for installing it(./ani-cli) to Path on git bash?

Acrossy commented 6 months ago

now you have to install it to the path, so that you can able to use it like ani-cli instead of ./ani-cli did you installed it from scoop, right?

So what is the command for installing it(./ani-cli) to Path on git bash?

I think there IS a way to copy/paste the file from "current directory" to another one. But if you mean the edited version of the script, in his case towards me, I went with "copying the file he gave me", which was an edited version of the "ani-cli" file without the cipher args and then paste it onto the directory where the original was "installed".

Note that this will get "undone" after you update the script through the command line. At least I noticed that on v .7 that the cipher args were back and I had to remove them my self.

Derisis13 commented 6 months ago

the faulty --cipher argument was removed in #1244, can we close this issue now?

port19x commented 6 months ago

the faulty --cipher argument was removed in #1244, can we close this issue now?

Sure, if anyone experiences issues on windows even if they seem related, please open a new issue.