摘要: 方法二: 其实上面的程序是将字典按照传统方式拼接的,一般不用 阅读全文
posted @ 2018-12-25 23:47 sunnybowen 阅读(17618) 评论(0) 推荐(1) 编辑
摘要: import urllib.parse url = 'https://www.baidu.com/s?wd=董博文&ie=utf-8&tn=97931839_hao_pg' ''' quote url编码函数''' ret =urllib.parse.quote(url) print(ret) '''url 解码函数''' ret = urllib.parse.unquote(ret) ... 阅读全文
posted @ 2018-12-25 23:43 sunnybowen 阅读(905) 评论(0) 推荐(0) 编辑
摘要: 方法2: 直接保存 运行结果: 阅读全文
posted @ 2018-12-25 23:40 sunnybowen 阅读(369) 评论(0) 推荐(0) 编辑