当前位置:网站首页>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 ~~
边栏推荐
- Impersonate server and client using message queuing
- remote: Support for password authentication was removed on August 13, 2021. Please use a personal ac
- What network security problems are exposed when a large-scale QQ number theft event occurs?
- Numpy creates an empty array data = np empty(shape=[1, 64,64,3])
- Shell programming overview
- [Title brushing] coco, who likes bananas
- With the development of industrial Internet, the landing and application of the Internet has become wider
- Zend studio how to import an existing project
- Observable, reliable: the first shot of cloudops series Salon of cloud automation operation and maintenance
- Initial attack and defense world Misc
猜你喜欢
What is erdma as illustrated by Coptic cartoon?
Google Earth engine (GEE) - ghsl: global human settlements layer, built grid 1975-1990-2000-2015 (p2016) data set
Getting started with shell Basics
[redis series] redis learning 16. Redis Dictionary (map) and its core coding structure
半导体动态杂谈
MySQL back to table query optimization
【科研数据处理】[实践]类别变量频数分析图表、数值变量分布图表与正态性检验(包含对数正态)
[scientific research data processing] [basic] category variable frequency analysis chart, numerical variable distribution chart and normality test (including lognormal)
VisualStudio and SQL
Crypto questions
随机推荐
How does MySQL merge columns?
“即服务”,企业数字化转型的必然选择
【科研数据处理】[基础]类别变量频数分析图表、数值变量分布图表与正态性检验(包含对数正态)
QQ 居然被盗了?原因在这......
Use of laravel repository mode
This editor will open source soon!
Tencent two sides: @bean and @component are used on the same class. What happens?
Jetpack Compose 实现完美屏幕适配
In the digital age, XDR (extended detection and response) has unlimited possibilities
"Persistent diseases" that cannot be solved in IM application development
Inexplicable error occurred in unity's frequent switching branch result model
编程实战赛来啦!B站周边、高级会员等好礼送你啦!
LeetCode_ Stack_ Medium_ 227. basic calculator II (without brackets)
PHP reverses scenarios based on code and skillfully uses debug_ backtrace()
可观测,才可靠:云上自动化运维CloudOps系列沙龙 第一弹
Race of golang
@ResponseBody的作用
Exlipse operates on multiple rows at the same time. For example, input the same text in multiple lines and columns at the same time
Laravel RBAC laravel permission use
Meaning of while (~scanf ("%d%d", & A, & B))