ask-web-fetch 0.5.3 → 0.5.4
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.
- checksums.yaml +4 -4
- data/lib/ask/web_fetch/backends/crawl4ai.rb +12 -1
- data/lib/ask/web_fetch/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d9126d245115b48e3be3d0f08166ae1bdae5d917d9bc84603c90b99a81ada84d
|
|
4
|
+
data.tar.gz: 5a6b70c34ab86157f850a5158838efc94361c46032eb184b8f611558150a6590
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 31f43065058dc40f29aeeced52b8d11c900c2e7a49b7bbf41cf9dd090a3b0b8ccd09507c2df4596ff73ef60a134828410005d4c19c2c4ae6e326a3f4abcb4d62
|
|
7
|
+
data.tar.gz: 94d089feccbc51350c7c0f7ebf06636ca53246c3e960dcb2c9aa8ca820bc96a2a1c3e2ebbc2b29a1faacbcea906388f2c56ad9faae4f7cb4a148967b5eb5b7a8
|
|
@@ -79,7 +79,18 @@ module Ask
|
|
|
79
79
|
req['Authorization'] = "Bearer #{self.class.token}" if self.class.token
|
|
80
80
|
req.body = JSON.generate(
|
|
81
81
|
urls: [url],
|
|
82
|
-
crawler_config: {
|
|
82
|
+
crawler_config: {
|
|
83
|
+
cache_mode: 'bypass',
|
|
84
|
+
timeout: CRAWL_TIMEOUT,
|
|
85
|
+
# Crawl4AI's server defaults to stealth OFF — a plain
|
|
86
|
+
# headless launch that bot protection fingerprints instantly
|
|
87
|
+
# (observed: Cloudflare/DataDome pages classified blocked
|
|
88
|
+
# before the render even finished). Ask for stealth so the
|
|
89
|
+
# service actually attempts challenge pages instead of
|
|
90
|
+
# pre-emptively failing them. (simulate_user/magic are
|
|
91
|
+
# BrowserConfig fields and rejected on untrusted requests.)
|
|
92
|
+
enable_stealth: true
|
|
93
|
+
}
|
|
83
94
|
)
|
|
84
95
|
|
|
85
96
|
res = http.request(req)
|