[Python] python通过urllib2获取带有中文参数的url内容 →→→→→进入此内容的聊天室

来自 , 2019-05-12, 写在 Python, 查看 112 次.
URL http://www.code666.cn/view/024677ef
  1. content = u'你好 sharejs.com'
  2. content = content.encode('utf-8')
  3. content = urllib2.quote(content)
  4. api_url = 'http://www.sharejs.com/q=%s'%content
  5. res = urllib2.urlopen(api_url)

回复 "python通过urllib2获取带有中文参数的url内容"

这儿你可以回复上面这条便签

captcha