Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Add boto3 availability util method

Yegor60bf56b715e4
diff --git a/scrapy/utils/boto.py b/scrapy/utils/boto.py
index 085ee7d25..7b18b6bcf 100644
--- a/scrapy/utils/boto.py
+++ b/scrapy/utils/boto.py
@@ -8,3 +8,12 @@ def is_botocore_available():
return True
except ImportError:
return False
+
+
+def is_boto3_available():
+ try:
+ import boto3 # noqa: F401
+
+ return True
+ except ImportError:
+ return False