Error: Episode not found, reason: CF_Captcha implementation
Make sure you are on the latest version by running ani-cli -U
Metadata (please complete the following information) Version: 4.13.0 OS: Ubuntu 22.04 Shell: bash Anime: All
Describe the bug A POST request to https://api.allanime.day/api returns the error saying "NEED_CAPTCHA". A GET request is blocked by cf A request from the browser is blocked by access control allow origin header
Is this the end of ani-cli? 😢
Can confirm the same on Windows 11 too:
can confirm error on mac (homebrew) too :
Okay, I think it's the end, can't find any way around this. If ani-cli ends, I'll stop watching anime till we get an actual official website with all anime sub & dub. I'm ready to pay if the source is at least as good as ani-cli.
The "tobeparsed" update was a ridicules way to block us, but it was a clear sign that they noticed the traffic from unknown sources.
The cf block on GET requests was much better. Now they blocked all requests with a CAPTURE.
allanime is no longer a source. We'll have to find new ones or archive. At this point, we're only helping them improve their API security. Perhaps, we should make a headless chromium scraper.
I posted a detailed debug on the closed issue... one of my ideas was to use curl-impersonate (drops in for curl, mimics browser TLS fingerprint). i have not tested this
I posted a detailed debug on the closed issue... one of my ideas was to use curl-impersonate (drops in for curl, mimics browser TLS fingerprint). i have not tested this
They are using cf, it requires javascript to execute. Spoofing the domain alone is not enough, if all their requests come from a set of trusted IP addresses, then we'd have to spoof that too because eventually they'll just switch to SSR. We're just playing cat and mouse with them
I posted a detailed debug on the closed issue... one of my ideas was to use curl-impersonate (drops in for curl, mimics browser TLS fingerprint). i have not tested this
They are using cf, it requires javascript to execute. Spoofing the domain alone is not enough, if all their requests come from a set of trusted IP addresses, then we'd have to spoof that too because eventually they'll just switch to SSR. We're just playing cat and mouse with them
Agreed. Even if you keep finding workarounds, the downtime between each break and fix is the real problem. It's not sustainable to depend on a source that's actively trying to block scrapers.
I posted a detailed debug on the closed issue... one of my ideas was to use curl-impersonate (drops in for curl, mimics browser TLS fingerprint). i have not tested this
I really like this idea btw, writing an application like that might be a fun adventure
I posted a detailed debug on the closed issue... one of my ideas was to use curl-impersonate (drops in for curl, mimics browser TLS fingerprint). i have not tested this
I really like this idea btw, writing an application like that might be a fun adventure
I was actually going to test it — I ran into something similar building an app where the target was fingerprinting TLS clients and spoofing the handshake was sufficient to get through. Would have been a fun one to dig into.
if they are so into getting us out of here, won't it be easy for them to just come here and look at the code and out plans ?
if they are so into getting us out of here, won't it be easy for them to just come here and look at the code and out plans ?
Yeah obviously, they know this repository exists, it's public
@JoshBot-Debug If possible, please rename the issue (something like: Error: Episode not found, reason: CF_Captcha implementation), as people are thinking this as a separate issue and creating duplicating ones
i guess its time to switch sources then?
It might be, I was trying some workarounds like rather than the script sending request to https://api.allanime.day/api, crafting a fetch code to be executed in the F12 console, something like this
fetch("https://api.allanime.day/api", {
method: "POST",
credentials: "include",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"variables": {
"showId": "inBARBpQC24H7Z6bE",
"translationType": "sub",
"episodeString": "2"
},
"query": "query ($showId: String!, $translationType: VaildTranslationTypeEnumType!, $episodeString: String!) { episode( showId: $showId translationType: $translationType episodeString: $episodeString ) { episodeString sourceUrls }}"
})
})
.then(res => res.json())
.then(data => {
const text = JSON.stringify(data);
console.log(text);
navigator.clipboard.writeText(text);
});
(the showID and other data are generated by the original script itself.) And I hoped I could pass the output to the script to play the file. But instead, I am met with this
{"errors":[{"message":"NEED_CAPTCHA","locations":[{"line":1,"column":102}],"path":["episode"],"extensions":{"code":"INTERNAL_SERVER_ERROR"}}],"data":{"episode":null}}
Which basically means either my idea will not work at all, or, there are stuff that I need to do more to make this work
Changing the allanime_refr variable in the script to https://youtu-chan.com solved the issue for me on both Termux and NixOS.
That info comes from a comment under a recently opened anipy-cli issue.
youtu-chan.com
can vouch for it, it works
We can close this issue. Please check https://github.com/sdaqo/anipy-cli/issues/315#issuecomment-4323792726 for the fix. The team will make a pull request when they have time.
Refer #1692