Xiaobai breaks through the anti-crawling mechanism of Baidu translation, and realizes a Chinese-English gadget with 33 lines of Python code!

 

My cousin stopped studying at the age of 17 and stayed in my house for almost a year.

In the first few months of my stay, I played games online every day. I couldn't discipline him verbally, so I wondered if he wanted to learn Python programming with me. He started asking me what is Python programming? I opened the Snake Python code that I taught students, and clicked to run. I said that Python is this, do you want to learn from me? He said yes right away, and I'm sure he was happier than he was when he won the game.

 

After learning python with me for less than a month, he let him explore and make a translator that crawls Baidu translation through python to create a private version of the gadget.

The Python code is as follows:

 

 

Interface diagram:

 

 

I explained his Python code, you can try it yourself if you like it.

 

 

In addition, newcomers who want the Python code of the Snake game can privately message me, and I will not talk too much here.

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326679473&siteId=291194637