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

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

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

urllib.parse.urlencode(data)

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

相关文章:

猜你喜欢
  • 2022-03-04
  • 2021-05-05
  • 2021-07-31
  • 2021-06-06
  • 2022-02-11
相关资源
相似解决方案