How can use puppeteer with my current chrome (keeping my credentials)










1















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










share|improve this question


























    1















    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










    share|improve this question
























      1












      1








      1


      1






      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










      share|improve this question














      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 14 '18 at 15:45









      Lucas ContuLucas Contu

      61




      61






















          1 Answer
          1






          active

          oldest

          votes


















          2














          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();"






          share|improve this answer























          • 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










          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
          );



          );













          draft saved

          draft discarded


















          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









          2














          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();"






          share|improve this answer























          • 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















          2














          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();"






          share|improve this answer























          • 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













          2












          2








          2







          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();"






          share|improve this answer













          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();"







          share|improve this answer












          share|improve this answer



          share|improve this answer










          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

















          • 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



















          draft saved

          draft discarded
















































          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.




          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Top Tejano songwriter Luis Silva dead of heart attack at 64

          ReactJS Fetched API data displays live - need Data displayed static

          政党