Puppeteer Tutorial - Puppeteer Full Course for Beginners 2022

Sdílet
Vložit
  • čas přidán 6. 08. 2024
  • 🌐 NodeMaven Proxy Provider: go.nodemaven.com/scrape
    💥 Special Bonus: Use "Michael" at checkout for an extra +2GB of bandwidth.
    🤖 2captcha Captcha Solving Service: bit.ly/2captchapromo
    Welcome to my Puppeteer Full Course for Beginners. In this video, I have compiled my Puppeteer Series I made into this 3-hour full course Puppeteer tutorial. The video is designed to learn everything necessary about Puppeteer to be able to complete big projects either your own or professionally. I decided to put the work in and teach you everything about Puppeteer because documentation is boring :D. I have over 3 years of experience professionally completing projects for thousands of dollars, and all the knowledge required to do so yourself is shared in this video.
    Code:
    github.com/michaelkitas/Nodej...
    github.com/michaelkitas/Puppe...
    github.com/michaelkitas/Puppe...
    github.com/michaelkitas/Puppe...
    Join our Discord: / discord
    Download Visual Studio Code: code.visualstudio.com/download
    Download Nodejs: nodejs.org/en/download/
    Puppeteer API: www.npmjs.com/package/puppeteer
    Puppeteer Cluster API: www.npmjs.com/package/puppete...
    Puppeteer Plugin Recaptcha API: www.npmjs.com/package/puppete...
    Puppeteer Stealth Plugin: www.npmjs.com/package/puppete...
    2Captcha Website (Affiliate Link): bit.ly/2captchapromo
    Python Download: www.python.org/downloads/rele...
    TwoCaptcha PyPi: pypi.org/project/2captcha-pyt...
    Donate
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    PayPal: support@websidev.com
    Bitcoin Wallet: bc1q05j8gcnq4mzvgj603cxdc8xxck4jgnu2ljsrt4
    Ethereum Wallet: 0x5e7BD4f473f153d400b39D593A55D68Ce80F8a2e
    Social
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    Website: websidev.com
    Linkedin: / michael-kitas-638aa4209
    Instagram: / michael_kitas
    Github: github.com/michaelkitas
    Business Email: support@websidev.com
    Intro (0:00)
    Setup, Web scraping & Testing (2:45)
    Grabbing Elements From HTML (11:37)
    Pagination & Saving Data To CSV File (26:47)
    Scrape multiple pages in parallel using puppeteer-cluster (48:02)
    How to bypass/solve reCAPTCHA using 2captcha API (1:06:19)
    How to bypass/solve normal captcha using 2captcha API (1:15:55)
    Bypass Detection using plugins, settings & proxies (1:35:53)
    How to bypass/solve hCaptcha using 2captcha API (1:46:39)
    Save & Reuse Cookies (1:54:34)
    Capture, Block & Mock Requests (2:01:00)
    Scrape Websites with Infinite Scrolling (2:14:55)
    How To Deploy Puppeteer Script in Heroku via CLI & GitHub in 2022 (2:24:48)
    How To Deploy Puppeteer Script in Vercel via CLI & GitHub in 2022 (2:44:46)
    How To Deploy Puppeteer Script in AWS Lambda in 2022 (2:55:14)
    Top 8 Web Scraping Tips Every Beginner Should Know (3:08:10)
    Tags:
    - Puppeteer Tutorial
    - Full Course Puppeteer
    - Puppeteer Nodejs
    - Web Scraping Full Course
    - Puppeteer Web Scraping Full Course
    #nodejs #puppeteer #webscraping

Komentáře • 84

  • @alexandra-lu4fp
    @alexandra-lu4fp Před rokem +16

    By far the most friendly Puppeteer Tutorial I've ever seen on the internet, thanks a lot Michael🙏! You're quite literally one of the best teachers on youtube.

  • @mattwaala
    @mattwaala Před rokem +1

    Thanks bro :) This is the best tutorial on youtube about web scrapping in node . Keep it up :)

  • @Amar11115
    @Amar11115 Před rokem +3

    God Bless You Man!
    Really awesome tutorial.
    Thanks a bunch!😄

  • @amoutsatsos
    @amoutsatsos Před rokem +1

    Μπραβο Μιχάλη! Πολύ ωραίο turorial οτι χρειαζόμουν για να φτιάξω scraping script για ένα πελάτη. Ευχαριστώ πολύ

  • @imposteralchemist4521
    @imposteralchemist4521 Před rokem +2

    Very intutive and friendly pupettier tutotial we need :)

  • @VenomsGT
    @VenomsGT Před rokem +1

    Thank you for the tutorials!

  • @matheusmaaia
    @matheusmaaia Před rokem +1

    Thank you, sir!

  • @mod7ex_fx
    @mod7ex_fx Před rokem +1

    thank you so much brother)

  • @Cognitoman
    @Cognitoman Před měsícem +1

    I haven’t watched the whole series. I’m going to though

  • @AnastasisPyriochos
    @AnastasisPyriochos Před rokem +1

    Very good Job Mike! I am currently into Cypress any suggestions (like a roadmap) on how to make a smooth transition to puppeteer ?Cheers Thanks

    • @MichaelKitas
      @MichaelKitas  Před rokem

      The course should go through all the basics that you need for smooth transition, if you have any other ideas let me know and I can make a video on them

  • @Cognitoman
    @Cognitoman Před měsícem +1

    Thanks bro

  • @zeddscarlxrd4331
    @zeddscarlxrd4331 Před rokem

    Damn this awsome

  • @jritzeku
    @jritzeku Před 9 měsíci +1

    WOW there is so much valuable info here! Just curious, are these similar techniques used to create something like a sneaker bot? Was hoping to practice the skills learned here and sneakerbot seems like a good one. I'll prob use my own e-commerce app instead since im sure that websites like nike will tools to prevent bots.

    • @MichaelKitas
      @MichaelKitas  Před 9 měsíci +1

      Thank you, yes, that’s correct 👍

  • @manasmishra9019
    @manasmishra9019 Před rokem +1

    Hey,great video man. I am facing a bit of problem in pagination as the class of the "next" button is different, any help on that frontier?

    • @MichaelKitas
      @MichaelKitas  Před 10 měsíci

      Thank you, you can replace old selector of "next" button with new selector on code.

  • @trestar7624
    @trestar7624 Před rokem +3

    Hi Michael, the new puppeteer version gives an error when using puppeteer-extra. I get this error:
    Error: An `executablePath` or `channel` must be specified for `puppeteer-core`
    Any help or update would be appreciated!

    • @MichaelKitas
      @MichaelKitas  Před rokem

      You need to download chromium locally and specific it's path using "executablePath" option

  • @sesu6743
    @sesu6743 Před 11 měsíci +2

    39:52 sudden jump where code has changed. Having a lot of trouble following..

  • @mykun8737
    @mykun8737 Před rokem +1

    hi Michalel, Node-Cron is notwoking on vercel, could you please make a video to help me?

    • @MichaelKitas
      @MichaelKitas  Před rokem

      It can’t work, Vercel is running server less

  • @SACHINDHOTE10
    @SACHINDHOTE10 Před rokem +1

    This video clears lot of my errors, currently working on rough project, where we can pass the search value from frontend and gets the results in frontend, using puppeteer at back end. But I am unable to integrate frontend(HTML page) with puppeteer code. I almost watched every CZcams tutorial for this requirement but no one explains how to handle puppeteer ode from front end, would appreciate if you can create a video on this. Thanks.

  • @Omarwaqar-pt7wf
    @Omarwaqar-pt7wf Před 9 měsíci +1

    I have one comcern ,what if we are building a production we site that does web scraping using puppetier the I guess it's possible that the website we are scraping can block us so how can we bypass that issue?

    • @MichaelKitas
      @MichaelKitas  Před 9 měsíci

      Check out my latest video on bypassing browser fingerprinting: czcams.com/video/pPQl4_3Bv7E/video.html&lc=UgxIbun9KNHxiI89RkN4AaABAg

  • @dzboss5136
    @dzboss5136 Před rokem +1

    how to rotate proxy autentication using seleniumwire please

  • @senceryurdatapan111
    @senceryurdatapan111 Před rokem +1

    Im getting an error if I want to use puppeteer-extra-plugin-stealth: UnhandledPromiseRejectionWarning: Error: An `executablePath` or `channel` must be specified for `puppeteer-core`

    • @MichaelKitas
      @MichaelKitas  Před rokem

      If you use puppeteer-core, then as the error suggestes, you need to install chromium and add the path of chromium or chrome as "executablePath" in the launch options

  • @danielgillett370
    @danielgillett370 Před rokem +1

    I'm really enjoying your tutorial! Thank you! I've used puppeteer once before, when it was still newly released. I've got a site that I'd ilke to interact with but it's got a lot of embedded javascript that I can''t seem to get past. Using the pages developer tools I can see the html elements. However, downloading the page, the elements are in javascript files. Is that something you'd like to help me with? I could pay you if we can get it working. If you're interested, please let me know and I'll send you the site. ...it's nothing bad. Just an e-commerce idea that I'm trying out. cheers!

    • @MichaelKitas
      @MichaelKitas  Před rokem

      Sure, you can send me more info here: mixaliskitas@gmail.com

  • @pwchan9748
    @pwchan9748 Před rokem +1

    puppeteer vs selenium, which one is better for intensive automation? like speed, performance?

    • @MichaelKitas
      @MichaelKitas  Před rokem

      Puppeteer is faster, I use it 99% of the time

  • @johngenrichpilarta4089
    @johngenrichpilarta4089 Před rokem +1

    I have a problem in pagination & saving data to csv file timestamp,, in pagination my browser is not paginating it didn't go to page 2 automatically and didn't get any item . I need to click the page one by one to get the items in every page

  • @fitter2boss72
    @fitter2boss72 Před rokem +1

    By monitor looks like we scrap pages (urls) one by one. Not in parallel.

    • @MichaelKitas
      @MichaelKitas  Před rokem +1

      No, that's not the case. Monitor shows the queue of links as we scrape a specific amount of links each time

  • @pokeytradetf2582
    @pokeytradetf2582 Před rokem +2

    Would be dope if you made a selenium full course.

  • @user-ep3pm2tw1e
    @user-ep3pm2tw1e Před 5 měsíci +1

    I have built an app with Puppeteer but need to ship it. I don’t know how to move it from my local to a cloud or something

    • @MichaelKitas
      @MichaelKitas  Před 3 měsíci

      Making a video on how to host it to AWS Lambda today, otherwise you can use a Window VM or something similar.

  • @japeter89
    @japeter89 Před rokem +1

    how can i capture the time it takes for all network requests to finish?

    • @MichaelKitas
      @MichaelKitas  Před rokem

      You can log time before visiting a page and then visit a page with networkidle2 option and then log time after that is finished

  • @pwchan9748
    @pwchan9748 Před rokem +1

    How about a proxy with a credential? Besides, bypassing the ReCaptcha can use speech to text, maybe you can look into it.

    • @MichaelKitas
      @MichaelKitas  Před rokem

      Use proxy chain to validate proxy: www.npmjs.com/package/proxy-chain

    • @MichaelKitas
      @MichaelKitas  Před 9 měsíci

      Just created a video on proxies, check it out: czcams.com/video/Q5qkGq_Ustc/video.html

  • @DSCSManoj
    @DSCSManoj Před rokem +1

    Hi Micheal, at 18:25 the program gives an error, saying.querySelector is not a function. Can you please help

    • @MichaelKitas
      @MichaelKitas  Před rokem

      Can you share your code or is it the exact same as mine?

    • @DSCSManoj
      @DSCSManoj Před rokem

      Sorry there was some mistake from my end. Thanks for the early reply.

  • @korkut31
    @korkut31 Před rokem +1

    in a 'loop' using appendFile and WriteFile is not appropriate, this leads memory issues. writeStreams should ne used.

  • @sekmekci
    @sekmekci Před rokem +1

    You say "1" all the time in the video, then change it to "5", but you never show how or why you change it. Because of that, it's hard to follow, but I learned a general overview of puppeteer thanks!

  • @danielpaes6457
    @danielpaes6457 Před rokem

    Hello, I'm from Brazil and I had difficulties to apply the content of your video, because the puppeteer version changed and with that it also changed some things that ended up in errors. If you can update the video with puppeteer content from the latest version.

    • @MichaelKitas
      @MichaelKitas  Před rokem

      Can you share the errors? The core functionalities haven’t changed or not that I noticed

    • @newtonmuthigani
      @newtonmuthigani Před rokem +1

      @@MichaelKitas I get a cannot read property null when adding the s-result-item to get all products what would be they way around this , am trying to scrape the amazon website too

    • @newtonmuthigani
      @newtonmuthigani Před rokem +1

      works after adding try-catch block

  • @evgenysm
    @evgenysm Před rokem

    Thanks a lot for the video! But I've a question regarding the pagination. You do the while loop then the for loop goes over the items, once for loops finishes you check the next button state.
    I find this approach quite confusing.
    I think it would be a more clear if you save the "read items script" as a separate function or file and enable this code once navigation to the next page has been done.
    What do you think about this option?

    • @MichaelKitas
      @MichaelKitas  Před rokem

      Sure, that’s a more clear approach

    • @evgenysm
      @evgenysm Před rokem

      @@MichaelKitas thanks for a quick answer, do you have an example of how this can be done? Not sure how to implement it

  • @RumberPlumber-ob3ll
    @RumberPlumber-ob3ll Před rokem +1

    Can we make it to search certain number of like 30 different text in search under a minute?

    • @MichaelKitas
      @MichaelKitas  Před 10 měsíci

      Not sure exactly of your goal, but yes you can use puppeteer cluster to do multiple searches at the same time to achieve fast results

    • @RumberPlumber-ob3ll
      @RumberPlumber-ob3ll Před 10 měsíci +1

      @@MichaelKitas thx for the tutorial puppeteer is better than python its easy to understand and its undetectable

  • @duniamotivasi8342
    @duniamotivasi8342 Před rokem +1

    Brother what themes do you use?

  • @ITEngines
    @ITEngines Před rokem +1

    can you make videos on python requests.

  • @nothaiderali
    @nothaiderali Před rokem +1

    Theme name?

  • @increasinginnumber
    @increasinginnumber Před rokem +1

    help it says module not found

    • @MichaelKitas
      @MichaelKitas  Před rokem

      Did you run 'npm install '?

    • @increasinginnumber
      @increasinginnumber Před rokem

      @@MichaelKitas Thank you for your reply michael i just needed to save my file before running

  • @apostoloskotsiras9458
    @apostoloskotsiras9458 Před rokem +1

    oreos aderfe

  • @DailyGamingLive
    @DailyGamingLive Před 5 měsíci

    18:42 - I have an issue, my code is skipping this step entirely so I can't get it to log the product name, I tried messing with my query selector and I added the console log to find out what the program was getting stuck on and found out it just skips this whole code, I have the same code as you up to this step.
    for(const producthandle of productHandles){
    console.log("2");

    // pass the single handle
    const productTitle = await page.evaluate(el => el.querySelector("div > div > span > div > div > div > div.puisg-col.puisg-col-4-of-12.puisg-col-8-of-16.puisg-col-12-of-20.puisg-col-12-of-24.puis-list-col-right > div > div > div.a-section.a-spacing-none.puis-padding-right-small.s-title-instructions-style > h2 > a.a-link-normal.s-underline-text.s-underline-link-text.s-link-style.a-text-normal > span").textContent, producthandle)
    console.log(productTitle)
    };

  • @phantazzor
    @phantazzor Před rokem +1

    I will forever get that error for the heroku version:
    Error: Failed to launch the browser process! spawn /Applications/Google Chrome ENOENT

    • @MichaelKitas
      @MichaelKitas  Před rokem +1

      You need to use a different executablePath on heroku I show how to do that in the tutorial

    • @MichaelKitas
      @MichaelKitas  Před rokem

      @@phantazzor Yes, at 2:25:00

    • @MichaelKitas
      @MichaelKitas  Před rokem

      @@phantazzor I don't understand what your are saying. I though the issue was on heroku

    • @MichaelKitas
      @MichaelKitas  Před rokem

      @@phantazzor If i didn't do it then it's not required, I am saying it's an option

    • @MichaelKitas
      @MichaelKitas  Před rokem

      @@phantazzor In the video I show heroku method as well. Thanks :)