Python2.7 相当于什么
from urllib.parse import urlparse, parse_qs
parsed_url = urlparse(url)
params = parse_qs(parsed_url.query)
我得到
>>> from urllib.parse import urlparse
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named parse
谢谢!
在python2中使用
from urlparse import urlparse, parse_qs
parsed_url = urlparse(url)
params = parse_qs(parsed_url.query)