-
Notifications
You must be signed in to change notification settings - Fork 51
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
Hitting CAPTCHA preventing paid fanclub discovery #107
Comments
I second this, i have the same issue. |
It appears to be reCAPTCHA v3, and we can see what this page actually does on demand from https://fantia.jp/recaptcha. I know yt-dlp and others in the past have found a way to take the <iframe> source, which allows you to paste the URL into a browser, solve the CAPTCHA, and then copy the response hash back to the command line. That might not be necessary depending on what Fantia has configured their CAPTCHA score threshold to be, since in most cases v3 presents no challenge: https://developers.google.com/recaptcha/docs/v3
As you can see here this page presents a button that kicks off a
Their backend I presume then calls out to To be frank, I'm not too keen to handle this at the moment because it only prevents scraping the paid plans page and hasn't affected manual downloading yet, but this is at least probably a path forward. If our verification score isn't up to their standard (too low) we'll probably then have to deal with the <iframe> method I mentioned above. Probably whatever /recaptcha/verify responds with would make that fairly straightforward. |
Another alternative: we can take our followed fanclubs from /api/v1/me/fanclubs, fetch each at /api/v1/fanclubs/, then iterate over all plans and check their status. This should work, but potentially could be very slow with lots of clubs. |
Their API has been recently protected by reCAPTCHA as well. API response if flagged as a bot:
|
I was able to encounter this using the same cookie as my browser session. From the browser, I solved the CAPTCHA at /recaptcha and fantiadl was able to proceed after. Rather than dealing with the above, I think what I'll do is implement a prompt to solve the CAPTCHA in a browser using the same session, then prompt the user if it's okay to proceed with something like:
|
I believe it's also possible to use selenium to solve the CAPTCHA automatically. At least that's what I did for my golang CLI program using chromedp. You could make an option for the user if they would like to opt in for automatic CAPTCHA solver or manual solve in the event the selenium approach no longer works. |
Using a headless browser to click the button probably works in most cases, but I also don't know how resilient that is since I don't know if Fantia ever throws back an actual CAPTCHA for you to solve. It seems not at all, or rare, so I'll keep it in mind. |
I thought I should just make a new issue about this as it is a bit different to the previous issue I made (#103) and I can't reopen it.
When running
fantiadl_v1.8.3.exe -c cookies.txt -p -t -r -m
orfantiadl.py -c cookies.txt -p -t -r -m
I get the output of:When printing out the
response_page
inmodels.py
, it is CAPTCHA that is being returned instead of the expected page with fanclub links.responsePageOutput.txt
Sadly, after waiting a couple weeks, hoping it would resolve itself, it didn't. Weirdly enough as well, I can access the entirety of Fantia on both Chrome and Firefox and have never even seen the CAPTCHA page. It for some reason is only ever being hit by fantiadl. Even if I go to the exact link that gets hit resulting in the CAPTCHA (
https://fantia.jp/mypage/users/plans?type=not_free&page={1}
) on a browser, I still do not actually get given the CAPTCHA.The text was updated successfully, but these errors were encountered: