How can use puppeteer with my current chrome (keeping my credentials)
i'm actually trying to use puppeteer for scraping and i need to use my current chrome to keep all my credentials and use it instead of relogin and type password each time which is a really time lose !
is there a way to connect it ? how to do that ?
i'm actually using node v11.1.0
and puppeteer 1.10.0
let scrape = async () =>
const browser = await log()
const page = await browser.newPage()
const delayScroll = 200
// Login
await page.goto('somesite.com');
await page.type('#login-email', '*******);
await page.type('#login-password', "******");
await page.click('#login-submit');
// Wait to login
await page.waitFor(1000);
and now it will be perfect if i do not need to use that and go on page (headless, i dont wan't to see the page opening i'm just using the info scraping in node) but with my current chrome who does not need to login to have information i need. (because at the end i want to use it as an extension of chrome)
thx in advance if someone knows how to do that
javascript node.js puppeteer
add a comment |
i'm actually trying to use puppeteer for scraping and i need to use my current chrome to keep all my credentials and use it instead of relogin and type password each time which is a really time lose !
is there a way to connect it ? how to do that ?
i'm actually using node v11.1.0
and puppeteer 1.10.0
let scrape = async () =>
const browser = await log()
const page = await browser.newPage()
const delayScroll = 200
// Login
await page.goto('somesite.com');
await page.type('#login-email', '*******);
await page.type('#login-password', "******");
await page.click('#login-submit');
// Wait to login
await page.waitFor(1000);
and now it will be perfect if i do not need to use that and go on page (headless, i dont wan't to see the page opening i'm just using the info scraping in node) but with my current chrome who does not need to login to have information i need. (because at the end i want to use it as an extension of chrome)
thx in advance if someone knows how to do that
javascript node.js puppeteer
add a comment |
i'm actually trying to use puppeteer for scraping and i need to use my current chrome to keep all my credentials and use it instead of relogin and type password each time which is a really time lose !
is there a way to connect it ? how to do that ?
i'm actually using node v11.1.0
and puppeteer 1.10.0
let scrape = async () =>
const browser = await log()
const page = await browser.newPage()
const delayScroll = 200
// Login
await page.goto('somesite.com');
await page.type('#login-email', '*******);
await page.type('#login-password', "******");
await page.click('#login-submit');
// Wait to login
await page.waitFor(1000);
and now it will be perfect if i do not need to use that and go on page (headless, i dont wan't to see the page opening i'm just using the info scraping in node) but with my current chrome who does not need to login to have information i need. (because at the end i want to use it as an extension of chrome)
thx in advance if someone knows how to do that
javascript node.js puppeteer
i'm actually trying to use puppeteer for scraping and i need to use my current chrome to keep all my credentials and use it instead of relogin and type password each time which is a really time lose !
is there a way to connect it ? how to do that ?
i'm actually using node v11.1.0
and puppeteer 1.10.0
let scrape = async () =>
const browser = await log()
const page = await browser.newPage()
const delayScroll = 200
// Login
await page.goto('somesite.com');
await page.type('#login-email', '*******);
await page.type('#login-password', "******");
await page.click('#login-submit');
// Wait to login
await page.waitFor(1000);
and now it will be perfect if i do not need to use that and go on page (headless, i dont wan't to see the page opening i'm just using the info scraping in node) but with my current chrome who does not need to login to have information i need. (because at the end i want to use it as an extension of chrome)
thx in advance if someone knows how to do that
javascript node.js puppeteer
javascript node.js puppeteer
asked Nov 14 '18 at 15:45
Lucas ContuLucas Contu
61
61
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
First welcome to the community.
You can use Chrome instead of Chromium but sincerely in my case, I get a lot of errors and cause a mess with my personal tabs. So you can create and save a profile, then you can login with a current or a new account.
In your code you have a function called "log" I'm guessing that there you set launch puppeeteer.
const browser = await log()
Into that function use arguments and create a relative directory for your profile data:
const browser = await puppeteer.launch(
args: ["--user-data-dir=./Google/Chrome/User Data/"]
);
Run your application, login with an account and the next time you enter you should see your credentials
Any doubt please add a comment.
Extra: Function names should start in a capital letter "await Log();"
hello i tried your method and ano other one ===> ``` const browser = await puppeteer.launch( headless: false, executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', // userDataDir:'/Users/lucasteisseire/Library/Application Support/Google/Chrome/Profile 1' );``` and does not work cant launch google browser chrome with my puppeteer using my profile
– Lucas Contu
Nov 15 '18 at 13:19
You cant do both things? I noticed a missing "dot" before your paths:executablePath: './Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
– Raul Rueda
Nov 15 '18 at 19:05
Sometimes you can have permission issues, so tried to copy your profile folder into your puppeteer project folder.
– Raul Rueda
Nov 15 '18 at 19:06
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53303919%2fhow-can-use-puppeteer-with-my-current-chrome-keeping-my-credentials%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
First welcome to the community.
You can use Chrome instead of Chromium but sincerely in my case, I get a lot of errors and cause a mess with my personal tabs. So you can create and save a profile, then you can login with a current or a new account.
In your code you have a function called "log" I'm guessing that there you set launch puppeeteer.
const browser = await log()
Into that function use arguments and create a relative directory for your profile data:
const browser = await puppeteer.launch(
args: ["--user-data-dir=./Google/Chrome/User Data/"]
);
Run your application, login with an account and the next time you enter you should see your credentials
Any doubt please add a comment.
Extra: Function names should start in a capital letter "await Log();"
hello i tried your method and ano other one ===> ``` const browser = await puppeteer.launch( headless: false, executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', // userDataDir:'/Users/lucasteisseire/Library/Application Support/Google/Chrome/Profile 1' );``` and does not work cant launch google browser chrome with my puppeteer using my profile
– Lucas Contu
Nov 15 '18 at 13:19
You cant do both things? I noticed a missing "dot" before your paths:executablePath: './Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
– Raul Rueda
Nov 15 '18 at 19:05
Sometimes you can have permission issues, so tried to copy your profile folder into your puppeteer project folder.
– Raul Rueda
Nov 15 '18 at 19:06
add a comment |
First welcome to the community.
You can use Chrome instead of Chromium but sincerely in my case, I get a lot of errors and cause a mess with my personal tabs. So you can create and save a profile, then you can login with a current or a new account.
In your code you have a function called "log" I'm guessing that there you set launch puppeeteer.
const browser = await log()
Into that function use arguments and create a relative directory for your profile data:
const browser = await puppeteer.launch(
args: ["--user-data-dir=./Google/Chrome/User Data/"]
);
Run your application, login with an account and the next time you enter you should see your credentials
Any doubt please add a comment.
Extra: Function names should start in a capital letter "await Log();"
hello i tried your method and ano other one ===> ``` const browser = await puppeteer.launch( headless: false, executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', // userDataDir:'/Users/lucasteisseire/Library/Application Support/Google/Chrome/Profile 1' );``` and does not work cant launch google browser chrome with my puppeteer using my profile
– Lucas Contu
Nov 15 '18 at 13:19
You cant do both things? I noticed a missing "dot" before your paths:executablePath: './Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
– Raul Rueda
Nov 15 '18 at 19:05
Sometimes you can have permission issues, so tried to copy your profile folder into your puppeteer project folder.
– Raul Rueda
Nov 15 '18 at 19:06
add a comment |
First welcome to the community.
You can use Chrome instead of Chromium but sincerely in my case, I get a lot of errors and cause a mess with my personal tabs. So you can create and save a profile, then you can login with a current or a new account.
In your code you have a function called "log" I'm guessing that there you set launch puppeeteer.
const browser = await log()
Into that function use arguments and create a relative directory for your profile data:
const browser = await puppeteer.launch(
args: ["--user-data-dir=./Google/Chrome/User Data/"]
);
Run your application, login with an account and the next time you enter you should see your credentials
Any doubt please add a comment.
Extra: Function names should start in a capital letter "await Log();"
First welcome to the community.
You can use Chrome instead of Chromium but sincerely in my case, I get a lot of errors and cause a mess with my personal tabs. So you can create and save a profile, then you can login with a current or a new account.
In your code you have a function called "log" I'm guessing that there you set launch puppeeteer.
const browser = await log()
Into that function use arguments and create a relative directory for your profile data:
const browser = await puppeteer.launch(
args: ["--user-data-dir=./Google/Chrome/User Data/"]
);
Run your application, login with an account and the next time you enter you should see your credentials
Any doubt please add a comment.
Extra: Function names should start in a capital letter "await Log();"
answered Nov 14 '18 at 17:45
Raul RuedaRaul Rueda
19412
19412
hello i tried your method and ano other one ===> ``` const browser = await puppeteer.launch( headless: false, executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', // userDataDir:'/Users/lucasteisseire/Library/Application Support/Google/Chrome/Profile 1' );``` and does not work cant launch google browser chrome with my puppeteer using my profile
– Lucas Contu
Nov 15 '18 at 13:19
You cant do both things? I noticed a missing "dot" before your paths:executablePath: './Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
– Raul Rueda
Nov 15 '18 at 19:05
Sometimes you can have permission issues, so tried to copy your profile folder into your puppeteer project folder.
– Raul Rueda
Nov 15 '18 at 19:06
add a comment |
hello i tried your method and ano other one ===> ``` const browser = await puppeteer.launch( headless: false, executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', // userDataDir:'/Users/lucasteisseire/Library/Application Support/Google/Chrome/Profile 1' );``` and does not work cant launch google browser chrome with my puppeteer using my profile
– Lucas Contu
Nov 15 '18 at 13:19
You cant do both things? I noticed a missing "dot" before your paths:executablePath: './Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
– Raul Rueda
Nov 15 '18 at 19:05
Sometimes you can have permission issues, so tried to copy your profile folder into your puppeteer project folder.
– Raul Rueda
Nov 15 '18 at 19:06
hello i tried your method and ano other one ===> ``` const browser = await puppeteer.launch( headless: false, executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', // userDataDir:'/Users/lucasteisseire/Library/Application Support/Google/Chrome/Profile 1' );``` and does not work cant launch google browser chrome with my puppeteer using my profile
– Lucas Contu
Nov 15 '18 at 13:19
hello i tried your method and ano other one ===> ``` const browser = await puppeteer.launch( headless: false, executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', // userDataDir:'/Users/lucasteisseire/Library/Application Support/Google/Chrome/Profile 1' );``` and does not work cant launch google browser chrome with my puppeteer using my profile
– Lucas Contu
Nov 15 '18 at 13:19
You cant do both things? I noticed a missing "dot" before your paths:executablePath: './Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
– Raul Rueda
Nov 15 '18 at 19:05
You cant do both things? I noticed a missing "dot" before your paths:executablePath: './Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
– Raul Rueda
Nov 15 '18 at 19:05
Sometimes you can have permission issues, so tried to copy your profile folder into your puppeteer project folder.
– Raul Rueda
Nov 15 '18 at 19:06
Sometimes you can have permission issues, so tried to copy your profile folder into your puppeteer project folder.
– Raul Rueda
Nov 15 '18 at 19:06
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53303919%2fhow-can-use-puppeteer-with-my-current-chrome-keeping-my-credentials%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown