Day 7 :urllib.parse.urlencode

urllib.parse.urlencode
urllib.request.urlopen(url,data,timeout)

其中如果data被赋值,则请求的方式就会由get转为post,而post需要提供一些待处理的数据。

这些待处理的数据需要一定的格式,因此就需要urllib.parse.urlencode

urllib.parse.urlencode(data)

data是一个字典形式的数据。

  

posted on 2019-03-12 22:20  mark_wang001  阅读(95)  评论(0编辑  收藏  举报

导航