Playwright Python Tutorial - Introduction

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ธ.ค. 2024

ความคิดเห็น • 96

  • @Zale370
    @Zale370 3 ปีที่แล้ว +27

    I just recently switched to playwright from selenium and I must say I am impressed, I vote for more playwright videos please 😁

    • @codeRECODE
      @codeRECODE  3 ปีที่แล้ว

      Happy to hear that! So you are using Python OR JS?

    • @Pylogicx
      @Pylogicx 3 ปีที่แล้ว

      @@codeRECODE Sir I'm using python and waiting for the next tutorial. Your teaching method is very easy to understand. Please upload the next video of this tutorial series.

    • @codeRECODE
      @codeRECODE  3 ปีที่แล้ว +1

      @@Pylogicx Thank you :-)
      Uploading one today.

  • @haideralihassan5053
    @haideralihassan5053 3 ปีที่แล้ว +2

    Yeah, it's looking very interesting.
    Waiting for more detail videos on playwright.

    • @codeRECODE
      @codeRECODE  3 ปีที่แล้ว +1

      More to come soon.

  • @ASOUE
    @ASOUE ปีที่แล้ว

    Very quick and clear. Going to now watch your scrapy+playwright video. I'm glad I found your channel.

    • @codeRECODE
      @codeRECODE  ปีที่แล้ว

      Awesome, thank you!

  • @souvik5560
    @souvik5560 2 ปีที่แล้ว +2

    Thank you for the initiative.
    It was a really great hands-on session.
    Would request you to make a playlist on Playwright.

    • @codeRECODE
      @codeRECODE  2 ปีที่แล้ว

      Yes, I need to get to it soon. Thanks for sharing your interest :-)

  • @heisenbergwhite5845
    @heisenbergwhite5845 3 ปีที่แล้ว +2

    Loved the video!
    Please make this a series🙏

    • @codeRECODE
      @codeRECODE  3 ปีที่แล้ว +1

      I am seriously considering this. Thanks for the feedback 🙂

  • @MohamedAhmed-rf5bk
    @MohamedAhmed-rf5bk ปีที่แล้ว

    Very very very good explanation. You have convinced me to switch to playwright. Scrapy + playwright is a deadly combo and thank you for such a beautiful explanation

  • @ruksharalam173
    @ruksharalam173 ปีที่แล้ว

    Concise video. Thanks. Please do more in-depth web scraping project videos.

  • @bn_ln
    @bn_ln 2 ปีที่แล้ว

    great tutorial - thanks for demonstrating the different selector choices

    • @codeRECODE
      @codeRECODE  2 ปีที่แล้ว

      Glad it was helpful!

  • @xilllllix
    @xilllllix 3 ปีที่แล้ว

    thanks, will give playwright a try today...

  • @dattadeotale3505
    @dattadeotale3505 2 ปีที่แล้ว

    Love to see new content

  • @codecumba
    @codecumba 2 ปีที่แล้ว

    This is an awesome! new subscriber here!😃

  • @anoojmungath6877
    @anoojmungath6877 2 ปีที่แล้ว

    Nice tutorial. Expecting more videos in playwright-python series.

  • @daviuliano2473
    @daviuliano2473 ปีที่แล้ว

    Absolutely great videos. I been following along for quite few videos now and am very grateful for your teachings... would definitely be interested on seeing more videos like this. (about scraping dynamics webpages)

  • @silverheart573
    @silverheart573 3 ปีที่แล้ว +2

    Can you guide on how we can use playwright with scrappy?

    • @codeRECODE
      @codeRECODE  3 ปีที่แล้ว +2

      Will post this soon 🙂

  • @venkateswararaop2302
    @venkateswararaop2302 3 ปีที่แล้ว +1

    Wonder and great teaching. I want from beginer level playwright with java videos

    • @codeRECODE
      @codeRECODE  3 ปีที่แล้ว

      Interesting! Good to see interest in Java 😃

  • @a4e69636b
    @a4e69636b ปีที่แล้ว

    Great video. Could you make a Go version of this video please?

    • @codeRECODE
      @codeRECODE  ปีที่แล้ว

      Web scraping with Go is a good idea. Not sure about Go with Playwright.
      There is a Playwright for Go - pkg.go.dev/github.com/mxschmitt/playwright-go
      It's not official though. Officially supported languages are JS, Python, Java and C#

    • @a4e69636b
      @a4e69636b ปีที่แล้ว

      @@codeRECODE I was able to start using Playwright with Go by translating your Python code to Go.

  • @NabeelButt
    @NabeelButt 2 ปีที่แล้ว

    I am getting error:
    It looks like you are using Playwright Sync API inside the asyncio loop.
    Please use the Async API instead.
    I tried async calls too but still error. Any idea how to solve this? I am using jupyter notebook.

  • @radwan9069
    @radwan9069 2 ปีที่แล้ว

    How can I export to playwright exe pyinstaller does not work

  • @himanshupoddar1395
    @himanshupoddar1395 2 ปีที่แล้ว

    We want more videos on playwright. Also a video on Why playwright is better than selenium

  • @tnssajivasudevan1601
    @tnssajivasudevan1601 3 ปีที่แล้ว +1

    Great Video Sir🙏

  • @Yoyo-gf3oi
    @Yoyo-gf3oi 2 ปีที่แล้ว +1

    As a user of both Selenium and Playwright at work, I must say Playwright is far superior, much faster, better documentation, and a lot less flaky. Once the Playwright community grows, it will become the industry standard without a doubt.

  • @joshuamarcano350
    @joshuamarcano350 2 ปีที่แล้ว

    🔥🔥🔥🔥🔥🔥 so easy and fast. Great video. I would love to see more in depth videos about playwright from you.

  • @Adityayadav-pv6xc
    @Adityayadav-pv6xc 3 ปีที่แล้ว +1

    I've done scraping the contents on the first page and all the next pages but what to do when we need to store the scraped data. Do I need to use another library for that or playwright has inbuilt storing in different format commands??

    • @codeRECODE
      @codeRECODE  3 ปีที่แล้ว

      Use usual python libraries like csv, etc.

  • @amilakulathunga
    @amilakulathunga 2 ปีที่แล้ว

    Thanks for the great video !

    • @codeRECODE
      @codeRECODE  2 ปีที่แล้ว

      Glad you liked it!

  • @Shashikantzz
    @Shashikantzz ปีที่แล้ว

    Sir please make more videos on scrapy playwright Thanks !

  • @ffgaming-fe3cx
    @ffgaming-fe3cx 10 หลายเดือนก่อน

    how to find multiple elements using python? which locator or selector should i need?

    • @codeRECODE
      @codeRECODE  7 หลายเดือนก่อน

      A selector matches all elements - so if the selector is div.alert it will match all divs that have this class.

  • @jagdish1o1
    @jagdish1o1 3 ปีที่แล้ว +1

    I just love your content ❤️ you make it look so simple 😅 I've done no professional course of python yet I'm using scrapy to scrape sites and doing automation just because of your videos I've learnt alot ❤️ thank you and please keep up the good work.

    • @codeRECODE
      @codeRECODE  3 ปีที่แล้ว +2

      Thank you so much for your kind words. This is exactly why I make these videos. 🙂

    • @jagdish1o1
      @jagdish1o1 3 ปีที่แล้ว +2

      @@codeRECODE please if possible create some tutorials for scrapy and playeright together.

  • @sebleaf8433
    @sebleaf8433 3 ปีที่แล้ว +1

    Thank you for the video. Maybe be you can try the scrapy-playwright package.

  • @abbaskhan5456
    @abbaskhan5456 11 หลายเดือนก่อน

    Selenium miss match the time of selectors in headless it is so much easy with playwright and fast.. also we need to use explicit wait in each element find in selenium but in playwright we can simple pass the wait with so much ease... I will definitely go with playwright

    • @codeRECODE
      @codeRECODE  11 หลายเดือนก่อน

      True!

  • @queseraseraozi
    @queseraseraozi ปีที่แล้ว

    How to click on "logout"? it doesn't look like button in html although it is. I am confused with that

    • @codeRECODE
      @codeRECODE  6 หลายเดือนก่อน

      Hey! Somehow missed your comment. Are you asking about the website in this video or something else?

  • @tubelessHuma
    @tubelessHuma 3 ปีที่แล้ว +1

    Hope it will be a good Selenium alternative. Thanks for this addition.💖

    • @codeRECODE
      @codeRECODE  3 ปีที่แล้ว

      This is definitely a good alternative, especially for those who don't know JS and for those who need multiple Browsers support.

  • @cosmicblack
    @cosmicblack 2 ปีที่แล้ว

    i see that ti has been 4 months withouth a new video in the list..will you continue this list? its a goog one , thanks

    • @codeRECODE
      @codeRECODE  2 ปีที่แล้ว

      Yeah! I do plan to continue this. Thanks for the reminder :-)

  • @Pylogicx
    @Pylogicx 3 ปีที่แล้ว

    great sir... waiting for next video

  • @srinug85
    @srinug85 ปีที่แล้ว

    Please make more videos on python playwright

  • @MichaelMerritt
    @MichaelMerritt 3 ปีที่แล้ว +1

    Would’ve been helpful to mention why someone might use this over selenium, it’s advantages and disadvantages. Saying one is interesting doesn’t explain much. Thanks for the video.

    • @codeRECODE
      @codeRECODE  3 ปีที่แล้ว

      Great point! I will post another video with a detailed comparison.

  • @jlei6802
    @jlei6802 2 ปีที่แล้ว +1

    if this is on Window O/S, can it use Webkit??

    • @AnirudhGarg1123
      @AnirudhGarg1123 2 ปีที่แล้ว +1

      Yes

    • @codeRECODE
      @codeRECODE  2 ปีที่แล้ว +1

      Somehow missed replying to this. Yes, webkit does work on Windows.

  • @legallyinsane205
    @legallyinsane205 3 ปีที่แล้ว

    Hi how can we do this with playwright or if is it even possible? in Scrapy response.replace(body=webdriver.page_source) using selenium, how can we do this with playwright, i tried response.replace(body=page.content()) but this doesn't work, kindly help!

    • @codeRECODE
      @codeRECODE  3 ปีที่แล้ว

      Why replace the response? You can create a new selector object
      from scrapy.selector import Selector
      s = Selector(text=page.content())
      s.xpath('').get()

  • @NG-tc7mh
    @NG-tc7mh 2 ปีที่แล้ว

    Nice video bro. When installing pip install playwright browser in vscode, i'm getting failed error which says "failed install chromium v100 and unable to get local issuer certificate" in my company laptop. Do you have any suggestion?

    • @codeRECODE
      @codeRECODE  2 ปีที่แล้ว

      I did a google search with your error and this is what I got:
      1. Reported here github.com/microsoft/playwright/issues/5636
      2. Solution here: playwright.dev/docs/browsers#install-behind-a-firewall-or-a-proxy

  • @elliotc4268
    @elliotc4268 2 ปีที่แล้ว

    very good tutorial :)

  • @nsnilesh604
    @nsnilesh604 3 ปีที่แล้ว +1

    Can we see more website interactions, it is much more interesting 👌 want to learn more about it 🙏

    • @codeRECODE
      @codeRECODE  3 ปีที่แล้ว

      Sure. More videos coming up soon

  • @Murtaza-Shiraz
    @Murtaza-Shiraz 3 ปีที่แล้ว

    What are the benefits of Playwright over Selenium?

    • @codeRECODE
      @codeRECODE  3 ปีที่แล้ว +1

      Playwright is much faster than selenium. That's the most important point. I will post another video with detailed comparison.

  • @raisulislam4161
    @raisulislam4161 3 ปีที่แล้ว

    Hello Sir,
    I have watched your Scrapy selenium tutorial and tried to implement the same procedure with Scrapy-Playwright. When I tried to run the script "raise Error(
    playwright._impl._api_types.Error: It looks like you are using Playwright Sync API inside the asyncio loop.
    Please use the Async API instead." this error is raised every time. Why this thing is happening?
    By the way, eagerly waiting for your scrapy playwright tutorial.

    • @codeRECODE
      @codeRECODE  3 ปีที่แล้ว

      The error is obvious but I did not cover async API. Will create a video on async api to help you understand the concept.

    • @raisulislam4161
      @raisulislam4161 3 ปีที่แล้ว

      @@codeRECODE sir waiting for your video on that. I am badly stuck here.

  • @jobinnelson
    @jobinnelson 3 ปีที่แล้ว

    which theme are you running on vs code ?

    • @codeRECODE
      @codeRECODE  3 ปีที่แล้ว

      Monokai Contrast with colors further customized in Settings

  • @emiljanmrizaj9013
    @emiljanmrizaj9013 3 ปีที่แล้ว

    Can you try next a tutorial on Playwright with Scrapy?

    • @codeRECODE
      @codeRECODE  2 ปีที่แล้ว +1

      Thanks for the specific suggestion.
      Yes, I have more tutorials planned around this subject.

  • @the_okoh
    @the_okoh ปีที่แล้ว

    Why does webscraping look so complex?
    I don't understand a thing.

    • @codeRECODE
      @codeRECODE  4 หลายเดือนก่อน

      It is complex. You need to know how websites work and then every website has it's own challenge :-)
      You need to spend time to learn, or hire someone else to do that for you!

  • @bud384
    @bud384 3 ปีที่แล้ว +1

    I think Selenium is still interesting enough because i can use VPN and proxy at the same time to scrape any sites i want

    • @sheikhakbar2067
      @sheikhakbar2067 3 ปีที่แล้ว

      Hi, could you direct me to a tutorial explaining how to use VPN with Selenium? I am scraping a website that's blocked in my country! 🙁

    • @codeRECODE
      @codeRECODE  3 ปีที่แล้ว +1

      Proxies can be used with Playwright. VPN would be at OS level. The biggest win for Selenium is the community support.

    • @codeRECODE
      @codeRECODE  3 ปีที่แล้ว +2

      @@sheikhakbar2067 use any vpn. I recommend vyprvpn because it's cheap.
      VPN is not at browser level but machine level. Once you connect to VPN, all apps including selenium will use VPN

    • @codeRECODE
      @codeRECODE  3 ปีที่แล้ว +2

      @@sheikhakbar2067 www.vyprvpn.com/buy-vpn
      Less than 2$ a month if you take long term plan.

  • @thalai143
    @thalai143 ปีที่แล้ว

    Selenium is like Vikram Rathore from Jawaan

    • @codeRECODE
      @codeRECODE  6 หลายเดือนก่อน

      🙂

  • @StonedApe420
    @StonedApe420 3 ปีที่แล้ว +1

    More

    • @codeRECODE
      @codeRECODE  3 ปีที่แล้ว

      Definitely! More to come soon 🙂

  • @morningbreeze3374
    @morningbreeze3374 2 ปีที่แล้ว

    My system does not show browser even if i have set timeout to page.wait_for_timeout(50000) simply terminal shows [Done] exited with code=0 in 0.175 seconds, headless=False

    • @codeRECODE
      @codeRECODE  2 ปีที่แล้ว

      Run this and see if this works - github.com/coderecode-com/playwright_sync_api_intro/blob/main/quotes.py
      If this doesn't work, try another browser. For example, for firefox, change line 6 to the following
      ```
      browser = p.firefox.launch(headless=False)
      ```