Use instead of + for space in python query parameters

前端 未结 7 1280
猫巷女王i
猫巷女王i 2021-02-03 23:30

I have written the following python script, using python requests (http://requests.readthedocs.org/en/latest/):

import requests

payload = {\'key1\': \'value  1\         


        
7条回答
  •  太阳男子
    2021-02-04 00:12

    try it.

    import urllib
    urllib.urlencode(params)
    

    http://docs.python.org/2/library/urllib.html#urllib.urlencode

提交回复
热议问题