| |
- builtins.object
-
- TabPooledChromium
class TabPooledChromium(builtins.object) |
|
TabPooledChromium(*args, tab_pool_max_size=None, **kwargs)
|
|
Methods defined here:
- __del__(self)
- __init__(self, *args, tab_pool_max_size=None, **kwargs)
- Create a chromium tab pool instance.
This will start a chromium instance, from which new tabs will be created as
needed with the tab() context manager.
Note that the destruction of the `TabPooledChromium` object will kill the associated chromium
execution. This will render any checked-out tabs invalid (though saving the tabs considering
they're constructed in a context-manager is pretty obviously wrong anyways).
- active_tabs(self)
- Return the number of currently active tabs.
- close(self)
- close_tabs(self)
- Close all open tabs (but the management tab).
If some of the tabs are being used, this may cause errors
- tab(self, netloc=None, url=None, extra_id=None, use_tid=False)
- Get a chromium tab from the pool, optionally one that has an association with a specific netloc/URL.
If no url or netloc is specified, the per-thread identifier will be used.
If `extra_id` is specified, it's stringified value will be mixed into the pool key
If `use_tid` is true, the per-thread identifier will be mixed into the pool key.
In all cases, the tab pool is a least-recently-used cache, so the tab that has been accessed the
least recently will be automatically closed if a new tab is requested, and there are already
`tab_pool_max_size` tabs created.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |