Whalesong Service¶
-
class
whalesong.Whalesong(profile=None, *, autostart=True, headless=False, extra_options=None, driver=None, loop=None, **kwargs)¶ Bases:
whalesong.managers.BaseManagerWhalesong service.
The main Whalesong manager.
Parameters: - profile (
Optional[str]) – Path to firefox profile. - autostart (
bool) – Whether driver must start immediately. - headless (
bool) – Whether browser must be started with headless flag. In production environments it should be set toTrue. - extra_options (
Optional[dict]) – Extra parametres for browser commandline. - loop (
Optional[AbstractEventLoop]) – Event loop. - loadstyles (bool) – Whether CSS styles must be loaded. It is need in order to get QR image. (Only for Firefox)
- interval (float) – Polling responses interval in seconds. Default 0.5 seconds. (Only for Firefox)
-
storage¶ -
Manager for local storage.
-
stream¶ -
Manager for stream object.
-
conn¶ -
Manager for connection object
-
contacts¶ -
Manager for contact collection.
-
chats¶ -
Manager for chat collection.
-
messages¶ -
Manager for messages collection.
-
wap¶ -
Manager for wap object.
-
sticker_packs¶ -
Manager for sticker pack collection.
-
status¶ -
Manager for status collection.
-
display_info¶ -
Manager for display information.
-
live_locations¶ -
Manager for live locations collection.
-
mutes¶ -
Manager for mutes collection.
-
status_v3¶ -
Manager for statuses version 3 (Stories) collection.
-
loop¶ Event loop.
Returns: Event loop.
-
await
start()¶ Start Whalesong service.
-
await
stop()¶ Stop Whalesong service.
-
await
wait_until_stop()¶ Wait until Whalesong service is stopped.
-
await
screenshot()¶ Take a screenshot of whole page.
Return type: BytesIOReturns: It returns a stream of a PNG image.
-
await
qr()¶ Take a screenshot of QR.
Return type: BytesIOReturns: It returns a stream of a PNG image.
-
stop_monitor(monitor)¶ Stop a given monitor.
Parameters: monitor ( MonitorResult[~T]) – Monitor object to stop.Return type: Result[None]
-
await
cancel_iterators()¶ Cancel all iterators.
- profile (