@apmantza/greedysearch-pi 1.6.1 → 1.6.2
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.
- package/CHANGELOG.md +5 -0
- package/extractors/gemini.mjs +21 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v1.6.2 (2026-04-01)
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
- **Anti-bot detection evasion** — Gemini synthesis now performs gentle scroll every ~6 seconds while waiting for the copy button. This prevents the button from hanging due to anti-bot "human activity" checks.
|
|
7
|
+
|
|
3
8
|
## v1.6.1 (2026-03-31)
|
|
4
9
|
|
|
5
10
|
### Features
|
package/extractors/gemini.mjs
CHANGED
|
@@ -48,8 +48,29 @@ async function typeIntoGemini(tab, text) {
|
|
|
48
48
|
|
|
49
49
|
async function waitForCopyButton(tab, timeout = 120000) {
|
|
50
50
|
const deadline = Date.now() + timeout;
|
|
51
|
+
let scrollCount = 0;
|
|
51
52
|
while (Date.now() < deadline) {
|
|
52
53
|
await new Promise((r) => setTimeout(r, 600));
|
|
54
|
+
|
|
55
|
+
// Gentle scroll every ~6 seconds to keep page "active" (anti-bot evasion)
|
|
56
|
+
if (++scrollCount % 10 === 0) {
|
|
57
|
+
await cdp([
|
|
58
|
+
"eval",
|
|
59
|
+
tab,
|
|
60
|
+
`
|
|
61
|
+
(function() {
|
|
62
|
+
const chat = document.querySelector('chat-window, [role="main"], main') || document.body;
|
|
63
|
+
const currentScroll = chat.scrollTop || window.scrollY || 0;
|
|
64
|
+
const scrollHeight = chat.scrollHeight || document.body.scrollHeight || 0;
|
|
65
|
+
// Small random scroll movement to mimic human reading
|
|
66
|
+
const jitter = Math.floor(Math.random() * 50) - 25;
|
|
67
|
+
const targetScroll = Math.min(scrollHeight, Math.max(0, currentScroll + jitter));
|
|
68
|
+
chat.scrollTo ? chat.scrollTo({ top: targetScroll, behavior: 'smooth' }) : window.scrollTo(0, targetScroll);
|
|
69
|
+
})()
|
|
70
|
+
`,
|
|
71
|
+
]).catch(() => null);
|
|
72
|
+
}
|
|
73
|
+
|
|
53
74
|
const found = await cdp([
|
|
54
75
|
"eval",
|
|
55
76
|
tab,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apmantza/greedysearch-pi",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "Pi extension: multi-engine AI search (Perplexity, Bing Copilot, Google AI) via browser automation — NO API KEYS needed. Extracts answers with sources, optional Gemini synthesis. Grounded AI answers from real browser interactions.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|