Home
last modified time | relevance | path

Searched full:urllib (Results 1 – 25 of 770) sorted by relevance

12345678910>>...31

/external/python/six/
Dsix.py297 MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"),
298 MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"),
299 MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"),
300 MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"),
328 MovedAttribute("ParseResult", "urlparse", "urllib.parse"),
329 MovedAttribute("SplitResult", "urlparse", "urllib.parse"),
330 MovedAttribute("parse_qs", "urlparse", "urllib.parse"),
331 MovedAttribute("parse_qsl", "urlparse", "urllib.parse"),
332 MovedAttribute("urldefrag", "urlparse", "urllib.parse"),
333 MovedAttribute("urljoin", "urlparse", "urllib.parse"),
[all …]
/external/scapy/scapy/modules/
Dsix.py303 MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"),
304 MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"),
305 MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"),
306 MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"),
334 MovedAttribute("ParseResult", "urlparse", "urllib.parse"),
335 MovedAttribute("SplitResult", "urlparse", "urllib.parse"),
336 MovedAttribute("parse_qs", "urlparse", "urllib.parse"),
337 MovedAttribute("parse_qsl", "urlparse", "urllib.parse"),
338 MovedAttribute("urldefrag", "urlparse", "urllib.parse"),
339 MovedAttribute("urljoin", "urlparse", "urllib.parse"),
[all …]
/external/python/parse_type/tasks/_vendor/
Dsix.py295 MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"),
296 MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"),
297 MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"),
298 MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"),
326 MovedAttribute("ParseResult", "urlparse", "urllib.parse"),
327 MovedAttribute("SplitResult", "urlparse", "urllib.parse"),
328 MovedAttribute("parse_qs", "urlparse", "urllib.parse"),
329 MovedAttribute("parse_qsl", "urlparse", "urllib.parse"),
330 MovedAttribute("urldefrag", "urlparse", "urllib.parse"),
331 MovedAttribute("urljoin", "urlparse", "urllib.parse"),
[all …]
/external/python/cpython3/Lib/test/
Dtest_urllib.py1 """Regression tests for what was in Python 2's "urllib" module"""
3 import urllib.parse
4 import urllib.request
5 import urllib.error
47 opener = urllib.request.FancyURLopener(proxies=proxies)
63 return urllib.request.FancyURLopener()
136 self._ftpwrapper_class = urllib.request.ftpwrapper
137 urllib.request.ftpwrapper = FakeFtpWrapper
140 urllib.request.ftpwrapper = self._ftpwrapper_class
161 self.quoted_pathname = urllib.parse.quote(self.pathname)
[all …]
Dtest_urlparse.py4 import urllib.parse
74 result = urllib.parse.urlparse(url)
80 result2 = urllib.parse.urlunparse(result)
86 result3 = urllib.parse.urlparse(result.geturl())
101 result = urllib.parse.urlsplit(url)
106 result2 = urllib.parse.urlunsplit(result)
111 result3 = urllib.parse.urlsplit(result.geturl())
126 result = urllib.parse.parse_qsl(orig, keep_blank_values=True)
129 result = urllib.parse.parse_qsl(orig, keep_blank_values=False)
135 result = urllib.parse.parse_qs(orig, keep_blank_values=True)
[all …]
Dtest_urllib2_localnet.py4 import urllib.parse
5 import urllib.request
191 # urllib.request uses the full path, so we're going to see if
269 (scm, netloc, path, params, query, fragment) = urllib.parse.urlparse(
308 ah = urllib.request.HTTPBasicAuthHandler()
310 urllib.request.install_opener(urllib.request.build_opener(ah))
312 self.assertTrue(urllib.request.urlopen(self.server_url))
313 except urllib.error.HTTPError:
317 ah = urllib.request.HTTPBasicAuthHandler()
319 urllib.request.install_opener(urllib.request.build_opener(ah))
[all …]
Dtest_urllib2net.py11 import urllib.error
12 import urllib.request
34 _urlopen_with_retry = _wrap_with_retry_thrice(urllib.request.urlopen,
35 urllib.error.URLError)
114 self.addCleanup(urllib.request.urlcleanup)
142 None, urllib.error.URLError),
155 urllib.error.URLError),
161 self.assertRaises(ValueError, urllib.request.urlopen,'./relative_path/to/file')
194 req = urllib.request.Request(urlwith_frag)
195 res = urllib.request.urlopen(req)
[all …]
Dtest_urllib2.py16 import urllib.request
19 from urllib.request import (Request, OpenerDirector, HTTPBasicAuthHandler,
23 from urllib.parse import urlparse
24 import urllib.error
41 exec('from urllib.%s import *' % module, context)
48 self.assertEqual(v.__module__, 'urllib.%s' % module,
49 "%r is exposed in 'urllib.%s' but defined in %r" %
56 self.addCleanup(urllib.request.urlcleanup)
58 self.assertRaises(ValueError, urllib.request.urlopen, 'bogus url')
61 fname = os.path.abspath(urllib.request.__file__).replace(os.sep, '/')
[all …]
Dtest_urllibnet.py8 import urllib.parse
9 import urllib.request
29 self.addCleanup(urllib.request.urlcleanup)
31 domain = urllib.parse.urlparse(support.TEST_HTTP_URL).netloc
33 f = urllib.request.urlopen(support.TEST_HTTP_URL)
38 """Tests urllib.request.urlopen using the network.
56 self.addCleanup(urllib.request.urlcleanup)
62 r = urllib.request.urlopen(*args, **kwargs)
105 open_url = urllib.request.FancyURLopener().open(URL)
148 urllib.request.urlopen("http://{}/".format(bogus_domain))
[all …]
Dtest_urllib_response.py1 """Unit tests for code in urllib.response."""
5 import urllib.response
22 addbase = urllib.response.addbase(self.fp)
41 closehook = urllib.response.addclosehook(self.fp, closehook)
48 info = urllib.response.addinfo(self.fp, self.test_headers)
55 infourl = urllib.response.addinfourl(self.fp, self.test_headers,
/external/python/cpython3/Lib/
D_compat_pickle.py46 'urlparse' : 'urllib.parse',
47 'robotparser' : 'urllib.robotparser',
48 'urllib2': 'urllib.request',
55 # complex stuff (e.g. mapping the names in the urllib and types modules).
77 ('urllib', 'ContentTooShortError'): ('urllib.error', 'ContentTooShortError'),
78 ('urllib', 'getproxies'): ('urllib.request', 'getproxies'),
79 ('urllib', 'pathname2url'): ('urllib.request', 'pathname2url'),
80 ('urllib', 'quote_plus'): ('urllib.parse', 'quote_plus'),
81 ('urllib', 'quote'): ('urllib.parse', 'quote'),
82 ('urllib', 'unquote_plus'): ('urllib.parse', 'unquote_plus'),
[all …]
Dnturl2path.py4 for urllib.requests, thus do not use directly.
17 import string, urllib.parse
29 return urllib.parse.unquote('\\'.join(components))
39 path = path + '\\' + urllib.parse.unquote(comp)
52 import urllib.parse
69 return urllib.parse.quote('/'.join(components))
75 drive = urllib.parse.quote(comp[0].upper())
80 path = path + '/' + urllib.parse.quote(comp)
/external/python/cpython3/Doc/howto/
Durllib2.rst4 HOWTO Fetch Internet Resources Using The urllib Package
22 **urllib.request** is a Python module for fetching URLs
29 urllib.request supports fetching URLs for many "URL schemes" (identified by the string
38 not intended to be easy to read. This HOWTO aims to illustrate using *urllib*,
40 the :mod:`urllib.request` docs, but is supplementary to them.
46 The simplest way to use urllib.request is as follows::
48 import urllib.request
49 with urllib.request.urlopen('http://python.org/') as response:
58 import urllib.request
60 with urllib.request.urlopen('http://python.org/') as response:
[all …]
/external/python/cpython2/Lib/test/
Dtest_urllib.py1 """Regression tests for urllib"""
4 import urllib
84 self.returned_obj = urllib.urlopen("file:%s" % self.pathname)
145 self.assertRaises(ValueError,urllib.urlopen,'./' + self.pathname)
164 proxies = urllib.getproxies_environment()
169 self.assertTrue(urllib.proxy_bypass_environment('anotherdomain.com'))
170 self.assertTrue(urllib.proxy_bypass_environment('anotherdomain.com:8888'))
171 self.assertTrue(urllib.proxy_bypass_environment('newdomain.com:1234'))
176 proxies = urllib.getproxies_environment()
179 proxies = urllib.getproxies_environment()
[all …]
Dtest_urllibnet.py5 import urllib
46 f = _open_with_retry(urllib.urlopen, "http://www.example.com/")
50 """Tests urllib.urlopen using the network.
65 return _open_with_retry(urllib.urlopen, *args)
115 open_url = urllib.FancyURLopener().open(URL)
153 # urllib.urlopen, "http://www.sadflkjsasadf.com/")
154 urllib.urlopen, "http://sadflkjsasf.i.nvali.d/")
157 """Tests urllib.urlretrieve using the network."""
160 return _open_with_retry(urllib.urlretrieve, *args)
212 response = urllib.urlopen("https://self-signed.pythontest.net", context=context)
[all …]
/external/python/cpython3/Doc/library/
Durllib.rst1 :mod:`urllib` --- URL handling modules
4 .. module:: urllib
6 **Source code:** :source:`Lib/urllib/`
10 ``urllib`` is a package that collects several modules for working with URLs:
12 * :mod:`urllib.request` for opening and reading URLs
13 * :mod:`urllib.error` containing the exceptions raised by :mod:`urllib.request`
14 * :mod:`urllib.parse` for parsing URLs
15 * :mod:`urllib.robotparser` for parsing ``robots.txt`` files
Durllib.error.rst1 :mod:`urllib.error` --- Exception classes raised by urllib.request
4 .. module:: urllib.error
5 :synopsis: Exception classes raised by urllib.request.
10 **Source code:** :source:`Lib/urllib/error.py`
14 The :mod:`urllib.error` module defines the exception classes for exceptions
15 raised by :mod:`urllib.request`. The base exception class is :exc:`URLError`.
17 The following exceptions are raised by :mod:`urllib.error` as appropriate:
38 value (the same thing that :func:`~urllib.request.urlopen` returns). This
61 This exception is raised when the :func:`~urllib.request.urlretrieve`
Durllib.request.rst1 :mod:`urllib.request` --- Extensible library for opening URLs
4 .. module:: urllib.request
11 **Source code:** :source:`Lib/urllib/request.py`
15 The :mod:`urllib.request` module defines functions and classes which help in
26 The :mod:`urllib.request` module defines the following functions:
38 urllib.request module uses HTTP/1.1 and includes ``Connection:close`` header
60 See :class:`urllib.response.addinfourl` for more detail on these properties.
72 returns a :class:`urllib.response.addinfourl` object.
74 Raises :exc:`~urllib.error.URLError` on protocol errors.
85 The legacy ``urllib.urlopen`` function from Python 2.6 and earlier has been
[all …]
/external/python/cpython2/Doc/library/
Durllib.rst1 :mod:`urllib` --- Open arbitrary resources by URL
4 .. module:: urllib
8 The :mod:`urllib` module has been split into parts and renamed in
9 Python 3 to :mod:`urllib.request`, :mod:`urllib.parse`,
10 and :mod:`urllib.error`. The :term:`2to3` tool will automatically adapt
12 Also note that the :func:`urllib.request.urlopen` function in Python 3 is
13 equivalent to :func:`urllib2.urlopen` and that :func:`urllib.urlopen` has
34 …For HTTPS URIs, :mod:`urllib` performs all the neccessary certificate and hostname checks by defau…
38 …For Python versions earlier than 2.7.9, urllib does not attempt to validate the server certificate…
128 filehandle = urllib.urlopen(some_url, proxies=proxies)
[all …]
/external/python/httplib2/python3/
Dhttplib2test.py21 import urllib.parse
323 uri = urllib.parse.urljoin(
333 uri = urllib.parse.urljoin(base, "methods/method_reflector.cgi")
339 uri = urllib.parse.urljoin(base, "methods/method_reflector.cgi")
357 uri = urllib.parse.urljoin(base, "304/test_etag.txt")
364 uri = urllib.parse.urljoin(base, "304/test_etag.txt")
374 uri = urllib.parse.urljoin(base, "304/test_etag.txt")
387 uri = urllib.parse.urljoin(base, "304/test_etag.txt")
396 uri = urllib.parse.urljoin(base, "user-agent/test.cgi")
404 uri = urllib.parse.urljoin(base, "user-agent/test.cgi")
[all …]
/external/python/cpython3/Lib/urllib/
Drobotparser.py14 import urllib.parse
15 import urllib.request
57 self.host, self.path = urllib.parse.urlparse(url)[1:3]
62 f = urllib.request.urlopen(self.url)
63 except urllib.error.HTTPError as err:
114 line[1] = urllib.parse.unquote(line[1].strip())
168 parsed_url = urllib.parse.urlparse(urllib.parse.unquote(url))
169 url = urllib.parse.urlunparse(('','',parsed_url.path,
171 url = urllib.parse.quote(url)
222 path = urllib.parse.urlunparse(urllib.parse.urlparse(path))
[all …]
/external/python/six/documentation/
Dindex.rst523 The :mod:`py2:urllib`, :mod:`py2:urllib2`, and :mod:`py2:urlparse` modules have
524 been combined in the :mod:`py3:urllib` package in Python 3. The
525 :mod:`six.moves.urllib` package is a version-independent location for this
527 :mod:`py3:urllib` package.
660 | ``urllib.parse`` | See :mod:`six.moves.urllib.parse` | :mod:`py3:urllib.parse` …
662 | ``urllib.error`` | See :mod:`six.moves.urllib.error` | :mod:`py3:urllib.error` …
664 | ``urllib.request`` | See :mod:`six.moves.urllib.request` | :mod:`py3:urllib.request` …
666 | ``urllib.response`` | See :mod:`six.moves.urllib.response`| :mod:`py3:urllib.response` …
668 | ``urllib.robotparser`` | :mod:`py2:robotparser` | :mod:`py3:urllib.robotparser…
670 | ``urllib_robotparser`` | :mod:`py2:robotparser` | :mod:`py3:urllib.robotparser…
[all …]
/external/python/setuptools/setuptools/
Dpackage_index.py15 import urllib.parse
16 import urllib.request
17 import urllib.error
49 _tmpl = "setuptools/{setuptools.__version__} Python-urllib/{py_major}"
88 parts = urllib.parse.urlparse(url)
90 base = urllib.parse.unquote(path.split('/')[-1])
92 base = urllib.parse.unquote(path.split('/')[-2])
213 yield urllib.parse.urljoin(url, htmldecode(match.group(1)))
220 yield urllib.parse.urljoin(url, htmldecode(match.group(1)))
262 fragment = urllib.parse.urlparse(url)[-1]
[all …]
/external/python/cpython2/Lib/
Dnturl2path.py12 import string, urllib
24 return urllib.unquote('\\'.join(components))
34 path = path + '\\' + urllib.unquote(comp)
47 import urllib
56 return urllib.quote('/'.join(components))
62 drive = urllib.quote(comp[0].upper())
67 path = path + '/' + urllib.quote(comp)
/external/perfetto/python/tools/
Dupdate_permalink.py5 import urllib
7 import urllib.request
8 import urllib.parse
142 request = urllib.request.Request(url, data=data)
144 response = urllib.request.urlopen(request)
157 fragment = urllib.parse.urlparse(url).fragment
159 return urllib.parse.parse_qs(fragment)["s"][0]
164 response = urllib.request.urlopen(url, context=context)
171 response = urllib.request.urlopen(url, context=context)

12345678910>>...31