Skip to content

Commit

Permalink
default value for sleep is set to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
amerkurev committed Mar 18, 2023
1 parent a143707 commit a5585da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ All other request parameters are optional and have default values. However, you
| `incognito` | Allows creating `incognito` browser contexts. Incognito browser contexts don't write any browsing data to disk. | `true` |
| `timeout` | Maximum operation time to navigate to the page in milliseconds; defaults to 30000 (30 seconds). Pass 0 to disable the timeout. | `30000` |
| `wait-until` | When to consider navigation succeeded, defaults to `domcontentloaded`. Events can be either:<br/>`load` - consider operation to be finished when the `load` event is fired.<br/>`domcontentloaded` - consider operation to be finished when the DOMContentLoaded event is fired.<br/>`networkidle` - consider operation to be finished when there are no network connections for at least 500 ms.<br/>`commit` - consider operation to be finished when network response is received and the document started loading. | `domcontentloaded` |
| `sleep` | Waits for the given timeout in milliseconds before parsing the article, and after the page has loaded. In many cases, a sleep timeout is not necessary. However, for some websites, it can be quite useful. Other waiting mechanisms, such as network events or waiting for selector visibility, are not currently supported. The default value is 300 milliseconds. | `300` |
| `sleep` | Waits for the given timeout in milliseconds before parsing the article, and after the page has loaded. In many cases, a sleep timeout is not necessary. However, for some websites, it can be quite useful. Other waiting mechanisms, such as waiting for selector visibility, are not currently supported. The default value is 0, which means no sleep. | `0` |
| `viewport-width` | The viewport width in pixels. | `414` |
| `viewport-height` | The viewport height in pixels. | `896` |
| `screen-width` | The page width in pixels. Emulates consistent window screen size available inside web page via window.screen. Is only used when the viewport is set. | `828` |
Expand Down
6 changes: 3 additions & 3 deletions app/argutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ def f(name, val):
('wait-until', (is_enum(('domcontentloaded', 'load', 'networkidle', 'commit')),), 'domcontentloaded'),
# Waits for the given timeout in milliseconds before parsing the article, and after the page has loaded.
# In many cases, a sleep timeout is not necessary. However, for some websites, it can be quite useful.
# Other waiting mechanisms, such as network events or waiting for selector visibility, are not currently supported.
# The default value is 300 milliseconds.
('sleep', (is_number, gte(0)), 300),
# Other waiting mechanisms, such as waiting for selector visibility, are not currently supported.
# The default value is 0, which means no sleep.
('sleep', (is_number, gte(0)), 0),
# The viewport width in pixels. The default value is 414 (iPhone 11 Viewport).
('viewport-width', (is_number, gt(0)), 414),
# The viewport height in pixels. The default value is 896 (iPhone 11 Viewport).
Expand Down

0 comments on commit a5585da

Please sign in to comment.