grab.spider.task — Grab 0.6.41 documentation

# `grab.spider.task`

## Module Contents

### Classes

`BaseTask` |
`Task` | Task for spider.

class grab.spider.task.BaseTask

class grab.spider.task.Task(name: None | str = None, url: None | str = None, grab: None | Grab = None, grab_config: None | GrabConfig = None, priority: None | int = None, priority_set_explicitly: bool = True, network_try_count: int = 0, task_try_count: int = 1, valid_status: None | list[int] = None, use_proxylist: bool = True, delay: None | int = None, raw: bool = False, callback: None | Callable[..., None] = None, fallback_name: None | str = None, store: None | dict[str, Any] = None, disable_cache: bool = False, refresh_cache: bool = False, cache_timeout: None | int = None, **kwargs: Any)

  Bases: `BaseTask`

  Task for spider.

  process_init_url_grab_options(url: None | str, grab: None | Grab, grab_config: None | GrabConfig) → None
  get(key: str, default: Any = None) → Any

    Return value of attribute or None if such attribute does not exist.

  process_delay_option(delay: None | float) → None
  setup_grab_config(grab_config: grab.types.GrabConfig) → None
  test_clone_options_integrity(url: None | str, grab: None | Grab, grab_config: None | GrabConfig) → None
  clone(**kwargs: Any) → Task

    Clone Task instance.

    Reset network_try_count, increase task_try_count. Reset priority attribute if it was not set explicitly.

  __repr__() → str

    Return repr(self).

  __lt__(other: Task) → bool

    Return self<value.

  __eq__(other: object) → bool

    Return self==value.