Home  >  Q&A  >  body text

Python, how to write the submission information in the post?

POWER_INFO.XML=(1%2C5)&time_stamp=Fri%20May%2012%202017%2014%3A07%3A18%20GMT%2B0800%20(%E4%B8%AD%E5%9B%BD%E6%A0%87%E5%87%86%E6%97%B6%E9%97%B4)

世界只因有你世界只因有你2712 days ago528

reply all(1)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-18 10:50:26

    import urllib
    import requests
    
    data = '(1,5)&time_stamp=Fri May 12 2017 14:07:18 GMT+0800 (中国标准时间)'
    quote_data = urllib.quote(data, safe='&()')
    
    post_data= "POWER_INFO.XML="+quote_data
    
    requests.post(url, data=post_data)

    reply
    0
  • Cancelreply