![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
puppeteer-extra-plugin-session
Advanced tools
A puppeteer plugin to dump and inject session data.
A puppeteer-extra plugin to export and import session data (cookies, localStorage, sessionStorage, indexedDb)
Dump and restore session data from your puppeteer pages.
This plugin supports:
yarn add puppeteer-extra-plugin-session
# or
npm install puppeteer-extra-plugin-session
First of all, you have to register the plugin with puppeteer-extra
.
JavaScript:
puppeteer.use(require('puppeteer-extra-plugin-session').default());
TypeScript:
import SessionPlugin from 'puppeteer-extra-plugin-session';
puppeteer.use(SessionPlugin());
Then, you'll have access to session data helpers:
const sessionData = await page.session.dump(); // or page.session.dumpString()
// [...]
await page.session.restore(sessionData); // or page.session.restoreString(sessionData)
You may wish to exclude certain storage backends from being dumped or restored.
This can be done by passing an options object to the dump
and restore
methods:
import { StorageProviderName } from 'puppeteer-extra-plugin-session';
const sessionData = await page.session.dump({
storageProviders: [
StorageProviderName.Cookie,
StorageProviderName.LocalStorage,
], // only dump cookies and LocalStorage
});
// Here is the list of StorageProviderName:
// * StorageProviderName.Cookie
// * StorageProviderName.LocalStorage
// * StorageProviderName.SessionStorage
// * StorageProviderName.IndexedDB
// You can also filter what gets restored:
await page.session.restore(sessionData, {
storageProviders: [StorageProviderName.Cookie], // only restore cookies (the previous dump also contained LocalStorage)
});
Tests are defined in *.spec.ts
files.
You can run the tests watcher using yarn test
or npm run test
You can see the package's logs by setting the DEBUG=puppeteer-extra-plugin:session
env variable.
Example: DEBUG=puppeteer-extra-plugin:session npm test
See the core Puppeteer-Extra Plugin docs for additional information: https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin
We appreciate all contributions.
See TODO.md
MIT
FAQs
A puppeteer plugin to dump and inject session data.
The npm package puppeteer-extra-plugin-session receives a total of 0 weekly downloads. As such, puppeteer-extra-plugin-session popularity was classified as not popular.
We found that puppeteer-extra-plugin-session demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.