This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Download handler for HTTP/2 supporting proxy CONNECT over HTTP/1. | |
You can use this by configuring it in the spider settings: | |
DOWNLOAD_HANDLERS = { | |
'https': 'scrapy_h2_proxy.H2DownloadHandler', | |
} | |
Tested with Scrapy 2.5.0. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from __future__ import absolute_import, division, unicode_literals | |
import logging | |
from collections import OrderedDict | |
from time import time | |
from urllib.parse import urldefrag | |
from scrapy.core.downloader import Downloader | |
from scrapy.core.downloader.handlers.http11 import HTTP11DownloadHandler, \ |