python3使用urllib示例取googletranslate(谷歌翻译)
复制代码 代码如下:#!/usr/bin/env python3# -*- coding: utf-8 -*-# File Name : gt1.py# Purpose :# Creation Date : 1390366260# Last Modified : Wed 22 Jan 2014 06:14:11 PM CST# Release By : Doom.zhou import urllib.requestimport sys typ = sys.getfilesystemencoding() def translate(querystr, to_l=”zh”, from_l=”en”
用户评论