Python Request?
如何构造这个url ?http://www.cn-healthcare.com/api/article/articlelist?data={%22start%22:%223%22,%22size%22:%2210%22,%22arctype%22:%220%22}
回答:
import urllibprint 'http://www.cn-healthcare.com/api/article/articlelist?'+str(urllib.quote('{"start":"3","size":"10","arctype":"0"}'))
回答:
可以在chrome console用encodeURI
函数来编码
> encodeURI('http://www.cn-healthcare.com/api/article/articlelist?data={"start":"3","size":"10","arctype":"0"}')< "http://www.cn-healthcare.com/api/article/articlelist?data=%7B%22start%22:%223%22,%22size%22:%2210%22,%22arctype%22:%220%22%7D"
以上是 Python Request? 的全部内容, 来源链接: utcz.com/a/157232.html