bhfutils 0.2.6__tar.gz → 0.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bhfutils-0.2.6 → bhfutils-0.2.7}/PKG-INFO +1 -1
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/pipelines.py +20 -5
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/settings_template.py +4 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils.egg-info/PKG-INFO +1 -1
- {bhfutils-0.2.6 → bhfutils-0.2.7}/setup.py +1 -1
- {bhfutils-0.2.6 → bhfutils-0.2.7}/MANIFEST.in +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/README.rst +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/__init__.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/__init__.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/bhf_signals.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/config/__init__.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/config/file_pusher.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/custom_cookies.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/distributed_scheduler.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/expire.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/items.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/log_retry_middleware.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/meta_passthrough_middleware.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/__init__.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/cursor/__init__.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/cursor/do_async/__init__.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/cursor/do_async/_mouse_helper.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/cursor/do_async/_spoof.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/cursor/do_sync/__init__.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/cursor/do_sync/_mouse_helper.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/cursor/do_sync/_spoof.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/cursor/js/mouseHelper.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/cursor/shared/__init__.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/cursor/shared/math.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/cursor/shared/spoof.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/handler.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/headers.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/__init__.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/chrome.app.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/chrome.csi.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/chrome.loadtimes.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/chrome.runtime.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/hairline.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/iframe.contentWindow.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/magic-arrays.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/media.codecs.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/navigator.deviceMemory.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/navigator.hardwareConcurrency.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/navigator.languages.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/navigator.permissions.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/navigator.platform.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/navigator.plugins.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/navigator.userAgent.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/navigator.vendor.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/navigator.webdriver.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/screen.touch.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/user-agent-override.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/utils.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/webgl.vendor.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/window.dimensions.js +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/page.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/stealth.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/policy.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/proxy_rotate.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/redis_domain_max_page_filter.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/redis_dupefilter.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/redis_global_page_per_domain_filter.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/redis_retry_middleware.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/redis_stats_middleware.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/spiders/__init__.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/spiders/redis_spider.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/tests/__init__.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/tests/online.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/tests/test_distributed_scheduler.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/tests/test_link_spider.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/tests/test_log_retry_middleware.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/tests/test_meta_passthrough_middleware.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/tests/test_pipelines.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/tests/test_redis_dupefilter.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/tests/test_redis_page_limit_filters.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/tests/test_redis_retry_middleware.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/tests/test_redis_stats_middleware.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/tests/test_wandering_spider.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/examples/__init__.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/examples/example_ah.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/examples/example_lf.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/examples/example_mt.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/examples/example_rq.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/examples/example_rtq.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/examples/example_sc.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/examples/example_sw.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/examples/example_zw.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/scutils/__init__.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/scutils/argparse_helper.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/scutils/log_factory.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/scutils/method_timer.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/scutils/redis_queue.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/scutils/redis_throttled_queue.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/scutils/settings_wrapper.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/scutils/stats_collector.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/scutils/zookeeper_watcher.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/tests/__init__.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/tests/default_settings.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/tests/online.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/tests/override_defaults.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/tests/test_argparse_helper.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/tests/test_log_factory.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/tests/test_method_timer.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/tests/test_redis_queue.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/tests/test_redis_throttled_queue.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/tests/test_settings_wrapper.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/tests/test_stats_collector.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/tests/test_zookeeper_watcher.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/tests/throttled_queue.py +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils.egg-info/SOURCES.txt +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils.egg-info/dependency_links.txt +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils.egg-info/requires.txt +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils.egg-info/top_level.txt +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils.egg-info/zip-safe +0 -0
- {bhfutils-0.2.6 → bhfutils-0.2.7}/setup.cfg +0 -0
|
@@ -131,14 +131,29 @@ class KafkaPipeline(object):
|
|
|
131
131
|
# falls back to the system trust store. Set it only for a private CA.
|
|
132
132
|
producer_kwargs['ssl_cafile'] = settings.get('KAFKA_SSL_CAFILE')
|
|
133
133
|
|
|
134
|
+
# Only passed when set explicitly, so the client keeps its own default: on for
|
|
135
|
+
# kafka-python 3.x, absent in 2.x. Verified working against the 3.4.1 broker
|
|
136
|
+
# both ways, so there is no reason to force either.
|
|
137
|
+
enable_idempotence = settings.get('KAFKA_PRODUCER_ENABLE_IDEMPOTENCE')
|
|
138
|
+
if enable_idempotence is not None and 'enable_idempotence' in KafkaProducer.DEFAULT_CONFIG:
|
|
139
|
+
producer_kwargs['enable_idempotence'] = enable_idempotence
|
|
140
|
+
|
|
141
|
+
# Tuning options come and go between client releases - kafka-python 3.x dropped
|
|
142
|
+
# buffer_memory, for one - and an unknown key makes the constructor fail outright.
|
|
143
|
+
# Drop what this client does not know about instead, and say so.
|
|
144
|
+
for key in [k for k in producer_kwargs if k not in KafkaProducer.DEFAULT_CONFIG]:
|
|
145
|
+
logger.warning("Kafka client does not support setting, ignoring it",
|
|
146
|
+
extra={'setting': key})
|
|
147
|
+
producer_kwargs.pop(key)
|
|
148
|
+
|
|
134
149
|
try:
|
|
135
150
|
producer = KafkaProducer(**producer_kwargs)
|
|
136
151
|
except Exception as e:
|
|
137
|
-
|
|
138
|
-
#
|
|
139
|
-
#
|
|
140
|
-
|
|
141
|
-
|
|
152
|
+
# Raise rather than sys.exit(): this runs inside the Twisted reactor while
|
|
153
|
+
# Scrapy builds the pipelines, where SystemExit leaves the process hanging
|
|
154
|
+
# with nothing in the crawl log. An exception aborts the crawl visibly.
|
|
155
|
+
logger.error("Unable to connect to Kafka in Pipeline", extra={'error': str(e)})
|
|
156
|
+
raise
|
|
142
157
|
topic_prefix = settings['KAFKA_TOPIC_PREFIX']
|
|
143
158
|
use_base64 = settings['KAFKA_BASE_64_ENCODE']
|
|
144
159
|
|
|
@@ -32,6 +32,10 @@ KAFKA_SASL_PASSWORD = None
|
|
|
32
32
|
# Only needed for a certificate from a private CA; leave None for a public one.
|
|
33
33
|
KAFKA_SSL_CAFILE = None
|
|
34
34
|
|
|
35
|
+
# Leave None to keep whatever the installed kafka-python defaults to. Set True or False
|
|
36
|
+
# only to override it deliberately.
|
|
37
|
+
KAFKA_PRODUCER_ENABLE_IDEMPOTENCE = None
|
|
38
|
+
|
|
35
39
|
ZOOKEEPER_ASSIGN_PATH = '/scrapy-cluster/crawler/'
|
|
36
40
|
ZOOKEEPER_ID = 'all'
|
|
37
41
|
ZOOKEEPER_HOSTS = 'localhost:2181'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/cursor/do_async/_mouse_helper.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/cursor/do_sync/_mouse_helper.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/playwright/js/navigator.hardwareConcurrency.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bhfutils-0.2.6 → bhfutils-0.2.7}/bhfutils/crawler/tests/test_meta_passthrough_middleware.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|