Changeset 1785:cbfc4a9daecb
- Timestamp:
- 10/07/09 21:00:34 (10 months ago)
- Author:
- Pablo Hoffman <pablo@…>
- Branch:
- default
- Message:
-
improved documentation of http proxy middleware
- Location:
- docs
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r1728
|
r1785
|
|
| 55 | 55 | ----------------------------------- |
| 56 | 56 | |
| 57 | | No. Support for HTTP proxies is not currently implemented in Scrapy, but it |
| 58 | | will be in the future. For more information about this, follow `this ticket |
| 59 | | <http://dev.scrapy.org/ticket/71>`_. Setting the ``http_proxy`` environment |
| 60 | | variable won't work because Twisted (the library used by Scrapy to download |
| 61 | | pages) doesn't support it. See `this Twisted ticket |
| 62 | | <http://twistedmatrix.com/trac/ticket/2714>`_ for more info. |
| | 57 | Yes. Support for HTTP proxies is provided (since Scrapy 0.8) through the HTTP |
| | 58 | Proxy downloader middleware. See |
| | 59 | :class:`~scrapy.contrib.downloadermiddleware.httpproxy.HttpProxyMiddleware`. |
| 63 | 60 | |
| 64 | 61 | Scrapy crashes with: ImportError: No module named win32api |
-
|
r1781
|
r1785
|
|
| 254 | 254 | :synopsis: Http Proxy Middleware |
| 255 | 255 | |
| | 256 | .. versionadded:: 0.8 |
| | 257 | |
| 256 | 258 | .. class:: HttpProxyMiddleware |
| 257 | 259 | |
| 258 | | This middleware sets proxy to use for requests, it obeys enviroment |
| 259 | | variables 'http_proxy', 'https_proxy', and 'no_proxy' |
| 260 | | |
| | 260 | This middleware sets the HTTP proxy to use for requests, by setting the |
| | 261 | ``proxy`` meta value to :class:`~scrapy.http.Request` objects. |
| | 262 | |
| | 263 | Like the Python standard library modules `urllib`_ and `urllib2`_ it obeys |
| | 264 | the following enviroment variables: |
| | 265 | |
| | 266 | * ``http_proxy`` |
| | 267 | * ``https_proxy`` |
| | 268 | * ``no_proxy`` |
| | 269 | |
| | 270 | .. _urllib: http://docs.python.org/library/urllib.html |
| | 271 | .. _urllib2: http://docs.python.org/library/urllib2.html |
| 261 | 272 | |
| 262 | 273 | RedirectMiddleware |
-
|
r1780
|
r1785
|
|
| 403 | 403 | 'scrapy.contrib.downloadermiddleware.redirect.RedirectMiddleware': 600, |
| 404 | 404 | 'scrapy.contrib.downloadermiddleware.cookies.CookiesMiddleware': 700, |
| | 405 | 'scrapy.contrib.downloadermiddleware.httpproxy.HttpProxyMiddleware': 750, |
| 405 | 406 | 'scrapy.contrib.downloadermiddleware.httpcompression.HttpCompressionMiddleware': 800, |
| 406 | 407 | 'scrapy.contrib.downloadermiddleware.stats.DownloaderStats': 850, |