mokr.console
Module Contents
Functions
|
Run a simple scrape of a URL. |
|
- async mokr.console.scrape(browser_type: str, url: str, headless: bool, timeout: int, wait_until: mokr.constants.LIFECYCLE_EVENTS, user_agent: str | None, proxy: str | None, output_file: str | None) None
Run a simple scrape of a URL.
- Parameters:
browser_type (str) – Either “chrome” or “firefox”.
url (str) – Target URL to navigate to.
headless (bool) – Run in headles mode, if True.
timeout (int) – Tiem to wait in milliseconds for page load.
wait_until (LIFECYCLE_EVENTS) – Condition to wait for.
user_agent (str | None) – User agent to override page with.
proxy (str | None) – Remote proxy to use.
output_file (str | None) – Output file.
- Raises:
SystemExit – Raised if any error encountered to set exit code to 1.
- mokr.console.main() None