Python uses the white whoring Netease translation API for translation

Time:2021-12-4

preface

First of all, thank the audience for revising my blog, and thank you for your support! Since I made the last blog post uploaded in the python community a long time ago, I copied it directly from my personal website, so there will be errors in pasting, especially the HTML text in the article will cause web page errors. I will modify it step by step. Then this issue is a pure tutorial. I will teach you how to use the interface step by step.

Find interface

Netease’s translation API needs money. If you want to try white whoring, you should start from an “open” place. What does “open” mean? “Public” refers to the place where the website is officially open (such as online translation)Web page translation, and start capturing bags

Python uses the white whoring Netease translation API for translation

Python uses the white whoring Netease translation API for translation

Python uses the white whoring Netease translation API for translation

It seems that the translated content is written directly in the website. After a general look at the translation results below, it will take a lot of time to process it directly. If you don’t want to access the website directly, you can only use the API provided by Youdao official,

I found the API demo in the official API introduction

Python uses the white whoring Netease translation API for translation

Python uses the white whoring Netease translation API for translation

And enter the text to start capturing the package,

Python uses the white whoring Netease translation API for translation

Python uses the white whoring Netease translation API for translation

Sure enough, I haven’t been disappointed, but it should be noted that this interface must be accessed by post. It’s just a demo. There is no application ID and key provided by Netease. It can’t be called frequently. Combined with the official API documents

Python uses the white whoring Netease translation API for translation

You can start writing code.

Write code

Since the interface allows multi language translation, I first write a simple program to call:

import requests

Python uses the white whoring Netease translation API for translation

No problem. It can be used after processing.

import requests

For more information, please add it yourself. Official reference link:https://ai.youdao.com/DOCSIRMA/html/%E8%87…

This work adoptsCC agreement, reprint must indicate the author and the link to this article

Recommended Today

The real problem of Alibaba IOS algorithm can’t hang up this time

More and more IOS developers continue to enter the peak of job hopping in 2020 Three main trends of interview in 2020: IOS bottom layer, algorithm, data structure and audio and video development Occupied the main battlefield. Data structure and algorithm interview, especially figure, has become the main reason for the failure of most first-line […]