美文网首页
Python Urlencode笔记

Python Urlencode笔记

作者: nanomko | 来源:发表于2016-11-12 16:02 被阅读0次
    #!/usr/bin/env python
    # -*- coding: utf-8 -*-
    # python 3.5.2
    
    from urllib.parse import urlencode, unquote, quote
    
    
    print(urlencode({"arg1": 1, "arg2": 2}))
    print(quote("测试"))
    print(unquote("%E6%B5%8B%E8%AF%95"))
    
    # output
    arg1=1&arg2=2
    %E6%B5%8B%E8%AF%95
    测试
    

    相关文章

      网友评论

          本文标题:Python Urlencode笔记

          本文链接:https://www.haomeiwen.com/subject/ugsqpttx.html