woob.capabilities.dating

exception OptimizationNotFound[source]

Bases: UserError

Raised when an optimization is not found.

class Optimization(id='', url=NotLoaded, backend=None)[source]

Bases: BaseObject

Optimization.

var CONFIG:

Configuration of optim can be made by woob.tools.value.Value objects in this dict.

Variables:

url – (str) url

CONFIG: Dict[str, Value] = {}
start()[source]

Start optimization.

stop()[source]

Stop optimization.

is_running()[source]

Know if the optimization is currently running.

Return type:

bool

get_config()[source]

Get config of this optimization.

Return type:

dict

set_config(params)[source]

Set config of this optimization.

Parameters:

params (dict) – parameters

class Event(id='', url=NotLoaded, backend=None)[source]

Bases: BaseObject

A dating event (for example a visite, a query received, etc.)

Variables:
  • url – (str) url

  • date – (date, datetime) Date of event

  • contact – (Contact) Contact related to this event

  • type – (str) Type of event

  • message – (str) Message of the event

class CapDating[source]

Bases: Capability

Capability for dating websites.

init_optimizations()[source]

Initialization of optimizations.

add_optimization(name, optim)[source]

Add an optimization.

Parameters:
  • name (str) – name of optimization

  • optim (Optimization) – optimization

iter_optimizations()[source]

Iter optimizations.

Return type:

iter[Optimization]

get_optimization(optim)[source]

Get an optimization from a name.

Parameters:

optim (str) – name of optimization

Return type:

Optimization

iter_events()[source]

Iter events.

Return type:

iter[Event]

iter_new_contacts()[source]

Iter new contacts.

Return type:

iter[Contact]