擅长:python、mysql、java
<p>您可能需要使用<a href="https://docs.python.org/3.6/library/urllib.parse.html#urllib.parse.parse_qs" rel="noreferrer">^{<cd1>}</a>:</p>
<pre><code>>>> from urllib.parse import urlparse, parse_qs
>>> url = 'http://example.com/?foo=bar&one=1'
>>> parse_qs(urlparse(url).query)
{'foo': ['bar'], 'one': ['1']}
</code></pre>
<p>对于Python 2,模块名为<a href="https://docs.python.org/2/library/urlparse.html#urlparse.parse_qs" rel="noreferrer" title="urlparse.parse_qs">^{<cd2>}</a>,而不是<code>url.parse</code>。</p>