You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pydoll implements **Cubic Bezier curves** for its scroll engine, ensuring that all scroll movements follow natural acceleration and deceleration profiles. This is combined with random jitter, micro-pauses, and overshoot correction to defeat advanced behavioral analysis.
This is implemented in browsers' smooth scrolling via CSS `scroll-behavior: smooth` using **bezier easing functions**.
964
974
975
+
!!! success "Pydoll Implementation"
976
+
Pydoll's scroll engine is built on top of these physics principles. When you use `scroll.by(..., humanize=True)`, it:
977
+
978
+
1. Calculates a **Cubic Bezier** trajectory for the scroll.
979
+
2. Applies **momentum** and **friction** to the velocity profile.
980
+
3. Injects **random jitter** to the delta values.
981
+
4. Adds **micro-pauses** and **overshoot** behavior to mimic human imperfection.
982
+
965
983
## Event Sequence Analysis
966
984
967
985
Beyond individual actions, anti-bot systems analyze the **sequence and timing** of events. Humans follow predictable interaction patterns, while bots often skip steps or execute them in unnatural orders.
Copy file name to clipboardExpand all lines: docs/en/features/automation/human-interactions.md
+69-53Lines changed: 69 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,17 @@
2
2
3
3
One of the key differentiators between successful automation and easily-detected bots is how realistic the interactions are. Pydoll provides sophisticated tools to make your automation virtually indistinguishable from human behavior.
4
4
5
-
!!! warning "Future Enhancements"
6
-
Pydoll is continuously improving its human-like interaction capabilities. Future versions will include:
5
+
!!! info "Feature Status"
6
+
**Already Implemented:**
7
7
8
-
- **Variable typing speed**: Built-in random intervals between keystrokes to eliminate the need for manual randomization
9
-
- **Realistic keyboard sequences**: Automatic simulation of typing mistakes, backspacing, corrections, and dynamic pauses for maximum realism
10
-
- **Automatic random click offsets**: Optional parameter to automatically randomize click positions within elements, eliminating manual offset calculations
11
-
- **Mouse movement simulation**: Realistic cursor paths with bezier curves
12
-
- **Mouse delta events**: Natural acceleration and deceleration patterns
13
-
- **Hover behavior**: Realistic delays and movement when hovering
14
-
- **Timing variations**: Randomized delays to avoid predictable patterns
The `interval` parameter is deprecated. Use `humanize=True` instead.
164
171
165
-
The `type_text()` method simulates human typing by sending individual keystrokes. The `interval` parameter adds a **fixed delay** between each keystroke.
172
+
### Natural Typing with Humanization
166
173
167
-
!!! info "Current State: Manual Randomization Required"
168
-
Currently, the `interval` parameter uses a **constant delay** for all characters. For maximum realism, you need to manually randomize typing speeds (as shown in the advanced examples below). Future versions will include automatic variable typing speed with built-in randomization.
174
+
Use `humanize=True` to simulate realistic human typing with variable speeds and occasional typos that are automatically corrected:
169
175
170
176
```python
171
177
import asyncio
@@ -178,13 +184,11 @@ async def natural_typing():
178
184
179
185
username_field =await tab.find(id="username")
180
186
password_field =await tab.find(id="password")
181
-
182
-
# Type with fixed intervals (currently)
183
-
# Average human typing: 0.1-0.3 seconds per character
- **smooth=True**: Uses browser's smooth animation and waits for `scrollend` event
291
-
- **smooth=False**: Instant scrolling for maximum speed when realism isn't critical
299
+
!!! tip "Choosing the Right Mode"
300
+
- **`smooth=True`**: Good for demos, screenshots, and general automation
301
+
- **`humanize=True`**: Essential when facing behavioral fingerprinting or bot detection
302
+
- **`smooth=False`**: Maximum speed when stealth is not a concern
292
303
293
304
### Human-Like Scrolling Patterns
294
305
295
-
!!! info "Future Enhancement: Built-in Realistic Scrolling"
296
-
Currently, you must manually implement random scrolling patterns. Future versions will include a `realistic=True` parameter that automatically adds natural variations in scroll distances, speeds, and pauses to mimic human reading behavior.
306
+
Pydoll's scroll engine uses **Cubic Bezier curves** to simulate the physics of human scrolling. This includes:
297
307
298
-
Simulate natural reading and navigation behavior:
308
+
-**Momentum**: Initial burst of speed followed by gradual deceleration.
309
+
-**Friction**: Natural slowing down based on "physical" resistance.
310
+
-**Micro-pauses**: Brief stops during long scrolls, mimicking reading or eye movement.
311
+
-**Overshoot**: Occasional scrolling past the target and correcting back.
312
+
313
+
This behavior is automatically enabled when you use `humanize=True`.
O Pydoll implementa **Curvas de Bezier Cúbicas** para seu motor de scroll, garantindo que todos os movimentos de rolagem sigam perfis naturais de aceleração e desaceleração. Isso é combinado com jitter aleatório, micro-pausas e correção de overshoot para derrotar análise comportamental avançada.
0 commit comments