Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Puppeteer & Custom Chrome Profile support out the box #14

Merged
merged 7 commits into from
Apr 24, 2019

Conversation

rubengmurray
Copy link
Collaborator

@rubengmurray rubengmurray commented Apr 11, 2019

  1. Added new passable variable to getCookies - 'Puppeteer' - that allows one to retrieve cookies ready to load directly into Puppeteer without any additional formatting.

  2. Added new variable to getCookies - 'Profile' - that allows one to select the Chrome Profile cookies they'd like to use / load. If none is given, the 'Default' Chrome Profile will be used.

  3. Moved the root OS (& Chrome profile) detection to the point the 'getCookies' function is called, rather than when the module is initially loaded in NODEJS. The reason being it will crash an application if no 'Default' profile for Chrome exists (which the module previously assumed) and in my case wasn't present.

… array of cookie objects and enabled this as a value to be passed as a 'format'. 2) moved process.platform checks inside of getCookies due to the fact this crashes on require('chrome-cookies-secure') if a Default Chrome Browser profile is unavailable. 3) Added the ability to pass through a new 'Profile' argument, specifying which Chrome profile one wishes to use for testing. This is passed to getCookies as the last argument, after the callback function. If no arg is passed, 'Default' is set.
… This has been tested in live for a number of weeks
@rubengmurray
Copy link
Collaborator Author

*This has been tested in a live app for the last month, using a custom Chrome profile, Puppeteer & Chrome Canary.

@bertrandom
Copy link
Owner

Thanks for making these changes!

@bertrandom bertrandom merged commit d4b66d4 into bertrandom:master Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants