In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article Xiaobian for you to introduce in detail "python how to achieve youdao dictionary command line fast translation", the content is detailed, the steps are clear, the details are handled properly, I hope this "python how to achieve youdao dictionary command line fast translation" article can help you solve your doubts, the following follow the editor's ideas slowly in-depth, together to learn new knowledge.
1. Prepare for
Before you begin, make sure that Python and pip are successfully installed on your computer. Oh, if not, please visit this article: hyperdetailed Python installation Guide for installation. If you use Python for data analysis, you can directly install Anaconda:Python data analysis and mining helper-Anaconda
Open Cmd (start-run-CMD) in Windows environment, and open Terminal (command+ space input Terminal) in Apple system environment, ready to start entering commands to install dependencies.
Of course, I recommend that you use the VSCode editor, Copy the code of this article, and install the dependency module by running commands in the terminal below the editor. What a comfortable thing: the best partner of Python programming-VSCode detailed guide.
Enter the following command at the terminal to install the dependent module we need:
Pip install youdao_dict
If you see Successfully installed xxx, the installation is successful.
two。 Use
When you come across a word that cannot be translated, just click on it in the editor below:
Youdao words you can't translate
For example, "slightly tipsy" in English:
Of course, it can also be translated from English into Chinese, such as standalone:
3. Source code analysis
The principle of this module is very simple, that is, it calls Youdao Translation's web version of API, which has the function of automatically detecting language:
Then different interpretations are crawled according to the HTML structure and its distribution of the page:
Read this, the "python how to achieve youdao dictionary command line fast translation" article has been introduced, want to master the knowledge of this article also need to practice and use in order to understand, if you want to know more related articles, welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.