We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f0f6ef commit 704487bCopy full SHA for 704487b
src/apify/scrapy/middlewares/apify_proxy.py
@@ -3,8 +3,13 @@
3
from typing import TYPE_CHECKING
4
from urllib.parse import ParseResult, urlparse
5
6
-from scrapy.core.downloader.handlers.http11 import TunnelError
7
-from scrapy.exceptions import NotConfigured
+try:
+ from scrapy.core.downloader.handlers.http11 import TunnelError
8
+ from scrapy.exceptions import NotConfigured
9
+except ImportError as exc:
10
+ raise ImportError(
11
+ 'To use this module, you need to install the "scrapy" extra. Run "pip install apify[scrapy]".',
12
+ ) from exc
13
14
from ...actor import Actor
15
from ...proxy_configuration import ProxyConfiguration
0 commit comments