Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
d2167032
Kaydet (Commit)
d2167032
authored
Nis 04, 2002
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Documentation for manual proxy configuration, by Andy Gimblett.
This closes SF patch #523415.
üst
3318792e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
liburllib.tex
Doc/lib/liburllib.tex
+35
-0
No files found.
Doc/lib/liburllib.tex
Dosyayı görüntüle @
d2167032
...
...
@@ -77,9 +77,17 @@ the proxy server before starting the Python interpreter. For example
...
\end{verbatim}
In a Windows environment, if no proxy envvironment variables are set,
proxy settings are obtained from the registry's Internet Settings
section.
In a Macintosh environment,
\function
{
urlopen()
}
will retrieve proxy
information from Internet
\index
{
Internet Config
}
Config.
The
\function
{
urlopen()
}
function does not support explicit proxy
specification. If you need to override environmental proxy settings,
use
\class
{
URLopener
}
, or a subclass such as
\class
{
FancyURLopener
}
.
Proxies which require authentication for use are not currently
supported; this is considered an implementation limitation.
\end{funcdesc}
...
...
@@ -195,6 +203,12 @@ define their own \mailheader{User-Agent} header by subclassing
attribute
\member
{
version
}
to an appropriate string value before the
\method
{
open()
}
method is called.
The optional
\var
{
proxies
}
parameter should be a dictionary mapping
scheme names to proxy URLs, where an empty dictionary turns proxies
off completely. Its default value is None, in which case
environmental proxy settings will be used if present, as discussed in
the definition of
\function
{
urlopen()
}
, above.
Additional keyword parameters, collected in
\var
{
x509
}
, are used for
authentication with the
\file
{
https:
}
scheme. The keywords
\var
{
key
_
file
}
and
\var
{
cert
_
file
}
are supported; both are needed to
...
...
@@ -360,3 +374,24 @@ The following example uses the \samp{POST} method instead:
>>> f = urllib.urlopen("http://www.musi-cal.com/cgi-bin/query", params)
>>> print f.read()
\end{verbatim}
The following example uses an explicitly specified HTTP proxy,
overriding environment settings:
\begin{verbatim}
>>> import urllib
>>> proxies =
{
'http': 'http://proxy.example.com:8080/'
}
>>> opener = urllib.FancyURLopener(proxies)
>>> f = opener.open("http://www.python.org")
>>> f.read()
\end{verbatim}
The following example uses no proxies at all, overriding environment
settings:
\begin{verbatim}
>>> import urllib
>>> opener = urllib.FancyURLopener(
{}
)
>>> f = opener.open("http://www.python.org/")
>>> f.read()
\end{verbatim}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment