当前位置:网站首页>On simple code crawling Youdao translation_ 0's problem (to be solved)
On simple code crawling Youdao translation_ 0's problem (to be solved)
2022-06-30 14:16:00 【Huaxi GG】
piu piu piu~~~
First blog
I don't know how to write
What Lao Jijiao wrote is almost the same as what he knew ~~
Spicy , To enter the body
# p14_2.py
import urllib.request
import urllib.parse
url = "http://fanyi.youdao.com/translate_0?smartresult=dict&smartresult=rule"
data = {}
data['type']='AUTO'
data['i']='i love FishC.com'
data['doctype']='json'
data['xmlVersion']='1.6'
data['ue']='UTF-8'
data['keyfrom']='fanyi.web'
data['typoResult']='true'
data=urllib.parse.urlencode(data).encode('utf-8')
response=urllib.request.urlopen(url,data)
html=response.read().decode('utf-8')
print(html)
This is the first reptile I wrote ( ok , Press Zero Basics python Copycat )
Run it
code 1
Tortoise and tortoise , What the hell is this
I used my intelligent brain to think for half an hour
Finally, I decided to go to Du Niang ~~
There is a blog written by brother Niu on the Internet ~~
Let's remove the beginning url in translate hinder _0
ok Go ahead
E:\360Downloads\ New text document .py\Scripts\python.exe C:/Users/MAIBENBEN/Desktop/ New text document .py
{"type":"EN2ZH_CN","errorCode":30,"elapsedTime":1,"translateResult":[[{"src":" Your request is from an illegal source , For commercial use, please pay attention to Youdao translation API Official website \u201C There is a way, a wise cloud \u201D: http:\/\/ai.youdao.com","tgt":" Your request is from an illegal source , For commercial use, please pay attention to Youdao translation API Official website \u201C There is a way, a wise cloud \u201D: http:\/\/ai.youdao.com"}]]}
Process finished with exit code 0
that The problem is coming.
_0 What role does it play here ?
I spent more than half an hour on Du Niang
Oh, my God –
Can't find
http://bbs.fishc.org/thread-86581-1-1.html
So I found this post ( ok , I also know it has been sinking for almost a year )
It says _0,BUT Did not say its usage
therefore It was finally decided Let's put this question aside ~~~
What Daniel knows I also looked out and explained ~
Later, when I have learned , I'm sure I can live up to this blog post ~~
边栏推荐
- Project management - common English vocabulary I
- go time. after
- VisualStudio and SQL
- Four isolation levels of MySQL
- Getting started with shell Basics
- Go language func function
- Zend studio how to import an existing project
- Click the TD cell of table to open the dialog pop-up window. After obtaining the value, put the value back into the TD cell
- Lucky hash quiz system development (source code deployment) fun investment hash game play development (case requirements)
- 可观测,才可靠:云上自动化运维CloudOps系列沙龙 第一弹
猜你喜欢

How to execute a query SQL

What network security problems are exposed when a large-scale QQ number theft event occurs?

Fastcgi CGI shallow understanding

Introduction to reverse commissioning - VA and RVA conversion in PE 04/07

Apache Doris comparison optimization Encyclopedia

Tencent two sides: @bean and @component are used on the same class. What happens?

Realize a simple LAN communication (similar to feiqiu)
![[redis series] redis learning 16. Redis Dictionary (map) and its core coding structure](/img/5a/5da6180db0b2b96660bcd9b4fa0633.png)
[redis series] redis learning 16. Redis Dictionary (map) and its core coding structure

Summary of use of laravel DCAT admin

QQ 居然被盗了?原因在这......
随机推荐
【刷题篇】避免洪水泛滥
Race of golang
Implementation of forwarding server using IO multiplexing
How to take the first step in digital transformation
[scientific research data processing] [basic] category variable frequency analysis chart, numerical variable distribution chart and normality test (including lognormal)
Detailed explanation of the first three passes of upload Labs
What is erdma as illustrated by Coptic cartoon?
Rpm2rpm packaging steps
Lifting scanning tool
表格储存中sql查询的时候,查询结果增加主键报错,查询结果超过10w行。需要对主键增加上多元索引吗?
Error on datetime when importing SQL file from MySQL
Google Earth Engine(GEE)——GHSL:全球人类住区层,建成网格 1975-1990-2000-2015 (P2016) 数据集
DB2 SQL Error: SQLCODE=-206, SQLSTATE=42703
Fastcgi CGI shallow understanding
exlipse同时操作多行。比如同时在多行同列输入相同的文字
“即服务”,企业数字化转型的必然选择
VisualStudio and SQL
Go language func function
Google Earth engine (GEE) - ghsl: global human settlements layer, built grid 1975-1990-2000-2015 (p2016) data set
Pytoch viewing model parameter quantity and calculation quantity