In this minor release we focused on the SessionPool
. Besides fixing a few bugs, we added one important feature: setting and getting of sessions by ID.
// Now you can add specific sessions to the pool,
// instead of relying on random generation.
await sessionPool.addSession({
id: 'my-session',
// ... some config
});
// Later, you can retrieve the session. This is useful
// for example when you need a specific login session.
const session = await sessionPool.getSession('my-session');
Full list of changes:
- Add
sessionPool.addSession()
function to add a new session to the session pool (possibly with the provided options, e.g. with specific session id). - Add optional parameter
sessionId
tosessionPool.getSession()
to be able to retrieve a session from the session pool with the specific session id. - Fix
SessionPool
not working properly in bothPuppeteerCrawler
andPlaywrightCrawler
. - Fix
Apify.call()
andApify.callTask()
output - make it backwards compatible with previous versions of the client. - Improve handling of browser executable paths when using the official SDK Docker images.
- Update
browser-pool
to fix issues with failing hooks causing browsers to get stuck in limbo. - Removed
proxy-chain
dependency because now it's covered inbrowser-pool
.