mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-08 06:55:36 +08:00
1 line
2.2 KiB
HTML
1 line
2.2 KiB
HTML
<div class="body" role="main"><div class="section" id="module-urllib"><h1><span class="yiyi-st" id="yiyi-10">21.5. <a class="reference internal" href="#module-urllib" title="urllib"><code class="xref py py-mod docutils literal"><span class="pre">urllib</span></code></a> - URL处理模块</span></h1><p><span class="yiyi-st" id="yiyi-11"><strong>源码:</strong> <a class="reference external" href="https://hg.python.org/cpython/file/3.5/Lib/urllib/">Lib/urllib/</a></span></p><p><span class="yiyi-st" id="yiyi-12"><code class="docutils literal"><span class="pre">urllib</span></code> 是一个工具包,包含用于处理 Url 的几个模块︰</span></p><ul class="simple"><li><span class="yiyi-st" id="yiyi-13"><a class="reference internal" href="urllib.request.html#module-urllib.request" title="urllib.request: Extensible library for opening URLs."><code class="xref py py-mod docutils literal"><span class="pre">urllib.request</span></code></a> 用于打开和读写urls</span></li><li><span class="yiyi-st" id="yiyi-14"><a class="reference internal" href="urllib.error.html#module-urllib.error" title="urllib.error: Exception classes raised by urllib.request."><code class="xref py py-mod docutils literal"><span class="pre">urllib.error</span></code></a>包含了由<a class="reference internal" href="urllib.request.html#module-urllib.request" title="urllib.request: Extensible library for opening URLs."><code class="xref py py-mod docutils literal"><span class="pre">urllib.request</span></code></a>引起的异常</span></li><li><span class="yiyi-st" id="yiyi-15"><a class="reference internal" href="urllib.parse.html#module-urllib.parse" title="urllib.parse: Parse URLs into or assemble them from components."><code class="xref py py-mod docutils literal"><span class="pre">urllib.parse</span></code></a> 用于解析urls</span></li><li><span class="yiyi-st" id="yiyi-16"><a class="reference internal" href="urllib.robotparser.html#module-urllib.robotparser" title="urllib.robotparser: Load a robots.txt file and answer questions about fetchability of other URLs."><code class="xref py py-mod docutils literal"><span class="pre">urllib.robotparser</span></code></a> 分析<code class="docutils literal"><span class="pre">robots.txt</span></code> 文件</span></li></ul></div></div> |