import urllib.request import urllib.parse req = urllib.request.Request('http://fanyi.youdao.com/translate_o?smartresult=dict&smartresult=rule') data = {} data['action'] = 'FY_BY_CLICKBUTTION' data['client'] = 'fanyideskweb' data['doctype'] = 'json' data['from'] = 'AUTO' data['i'] = 'i+love+you' data['keyfrom'] = 'fanyi.web' data['salt'] = '1536060051663' data['sign'] = '12546ed152c5c8abda3669e49dbdcee7' data['smartresult'] = 'dict' data['to'] = 'AUTO' data['typoResult'] = 'false' data['version'] = '2.1' data = urllib.parse.urlencode(data).encode('utf-8') response = urllib.request.urlopen(req) html = response.read() html = html.decode('utf-8') print(html)
爬虫有道翻译
最新推荐文章于 2024-04-18 11:22:38 发布