Closed JustFrederik closed 1 year ago
Please read line 3687 of view-source:https://fanyi.baidu.com/
, thanks.
@UlionTse 1. It works without the second request.
Thanks for your guidance, bro. The second request ensures the stability of the service and does not affect the speed of the request because the link is not used again after the session is obtained. Language checks are necessary, cost almost no time, you can test it, and that can avoid anti-cheating.
@UlionTse i am implementing my own translator and needed to fetch the languages. I have gone with the attempt to fetch them before and have a csv file that maps them together. That has the benefits of having universal identifiers. I noticed that there is indeed protection, but it isn’t a cookie but a ip lookup. It isn’t used for the translation, but only the language detection. The second request doesn’t help at all for stability since it takes Baidu like half a minute to register the ip. I’m working with rust, but something like this comes back from the server: error trying to connect: dns error: failed to lookup address information: nodename nor servname provided, or not known. It’s just something I noticed while working with it.
And that there is no cost is simply wrong. At least from where I live. The translation is fetched within 2 seconds, but the language check takes 5-10seconds each.
Anyway I’m gonna close this issue. It was just something I wanted to point out, because it has no purpose.I thought the request was redundant, because it will succeed, but it is redundant because the second request will fail when the first failed
Debug Tips
What happened?
This line is redundant
its on line 620. i noticed the comment, but i tried it without and it worked and there is no code that would attach the cookies, so...
APP Version
latest
Python Version
3.9 (Default)
Runtime Environment
Other
Country/Region
Germany
Relevant log output
No response
Screenshots
No response
Code of Conduct