@@ -1663,6 +1663,9 @@ msgid ""
16631663"URL scheme involved. For example, the :envvar:`!http_proxy` environment "
16641664"variable is read to obtain the HTTP proxy's URL."
16651665msgstr ""
1666+ ":func:`build_opener` 默认提供了许多处理句柄,包括 :class:`ProxyHandler`。 "
1667+ "在默认情况下,:class:`ProxyHandler` 会使用名为 ``<scheme>_proxy`` 的环境变量,其中 ``<scheme>`` "
1668+ "是对应的 URL 方案。 例如,可以读取 :envvar:`!http_proxy` 环境变量可获得 HTTP 代理的 URL."
16661669
16671670#: ../../library/urllib.request.rst:1290
16681671msgid ""
@@ -1745,6 +1748,9 @@ msgid ""
17451748":meth:`!info` method of the object returned by :func:`urlopen` returned (for"
17461749" a remote object). Exceptions are the same as for :func:`urlopen`."
17471750msgstr ""
1751+ "将一个 URL 形式的网络对象复制为本地文件。 如果 URL 指向一个本地文件,则必须提供文件名才会复制对象。 返回一个元组 ``(filename, "
1752+ "headers)`` 其中 *filename* 为保存该对象的本地文件名,而 *headers* 是由 :func:`urlopen` 返回的对象的 "
1753+ ":meth:`!info` 方法的返回结果(对于远程对象)。 可引发的异常与 :func:`urlopen` 的相同。"
17481754
17491755#: ../../library/urllib.request.rst:1385
17501756msgid ""
@@ -1784,6 +1790,11 @@ msgid ""
17841790"expected amount (which is the size reported by a *Content-Length* header). "
17851791"This can occur, for example, when the download is interrupted."
17861792msgstr ""
1793+ ":func:`urlretrieve` 在检测到可用数据少于预期大小(即由 *Content-Length* 标头所报告的大小)时将引发 "
1794+ ":exc:`~urllib.error.ContentTooShortError`。 例如,这可能会在下载被中断时发生。 when it detects"
1795+ " that the amount of data available was less than the expected amount (which"
1796+ " is the size reported by aheader). This can occur, for example, when the "
1797+ "download is interrupted."
17871798
17881799#: ../../library/urllib.request.rst:1412
17891800msgid ""
@@ -1798,7 +1809,7 @@ msgstr ""
17981809msgid ""
17991810"You can still retrieve the downloaded data in this case, it is stored in the"
18001811" :attr:`!content` attribute of the exception instance."
1801- msgstr ""
1812+ msgstr "在此情况下你仍然能够获取已下载的数据,它将保存在异常实例的 :attr:`!content` 属性中。 "
18021813
18031814#: ../../library/urllib.request.rst:1419
18041815msgid ""
0 commit comments