Python Selenium Tutorial #8 - Capture, Block & Mock Requests using Selenium Wire

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

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

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

    What would you like to see next?

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

      dealing with anti bot technologies like cloudflare for example

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

      Dockerize the same will be helpful...

  • @redabitar
    @redabitar 7 หลายเดือนก่อน +1

    Really really helpful, thanks for making it simple!

  • @dubey_ji
    @dubey_ji 10 หลายเดือนก่อน +1

    Hey man just found your channel you're awesome
    Thank you for your content

    • @MichaelKitas
      @MichaelKitas  10 หลายเดือนก่อน

      Glad you enjoy it!

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

    Great video on the basics of selenium-wire! I'm looking for how to intercept websocket messages, and there doesn't appear to be much of anything on the topic besides a few issues on the sw github that still don't give much. Would be a good video for you to do, would definitely receive good search results!

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

    thank you for this tutorial, really helpful

  • @Nathan2904
    @Nathan2904 9 หลายเดือนก่อน +1

    grats bro, your videos helped me a lot.

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

    Excellent video bro, thank you very much, a question how can I make it listen to all the responses that arrive in the network tab, that is, leave it running the script and capture all the fetch that arrives, Thanks

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

      I show that in the video, use the “response” event which captures all the responses.

  • @gijoo.x
    @gijoo.x 2 ปีที่แล้ว +1

    thank you for these tutorials keep it up

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

    Good video brother, thanks for your work, I have a question, how can I keep the browser listening to the network without it closing, I put what you did into operation and it works fine, only when I finish executing the test the browser closes and I would like keep it open listening to the network

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

      Just remove the "await browser.close()" line

  • @Helza99
    @Helza99 8 หลายเดือนก่อน +1

    How can you use this with the UC mode from the previous video?

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

      import seleniumwire.undetected_chromedriver as uc
      chrome_options = uc.ChromeOptions()
      driver = uc.Chrome(options=chrome_options)
      driver.get('www.wikipedia.org/')
      print(driver.requests)

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

    What if i need new requests everytime i click navbar/href of a specific website?...basically i want to print network logs of a website everytime i click a new href

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

      Did you test it? It should work even after navigation

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

    How can we achieve the same with mobile browser?

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

      Will make a mobile browser selenium tutorial in the near future, good idea

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

    Is it possible to load browser profile in selenium-wire driver

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

      Yeah, the same as normal selenium

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

    dude there is like a website that detects temp email i used selinium and tried to sign in using temp mail but it detects
    can we fix this changing the cookies?? help me

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

      Check this video: th-cam.com/video/QvaZLa_FKmY/w-d-xo.html

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

    How to filter using request body bro , please help

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

      What do you mean? Do you have an example?

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

      @@MichaelKitas like post request, we could use same url for different 100s of requests .. I need to filter out just one which uses some parameters in post request, like user_id=18281&type=0 and so on

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

      @@new_contents_all_day check if url contains those words in url parameters and if so abort the request like I showed on the video

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

      @@MichaelKitas no it's a post request

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

      @@new_contents_all_day it's the same thing

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

    hello bro plese help me , i get error ""import _brotli ImportError: DLL load failed while importing _brotli: The specified module could not be found." , how solve the this problem?

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

      Can you share code?

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

      @@MichaelKitas Wow, thanks, I've found the method, it turns out that there is a Windows C++ driver that hasn't been downloaded yet, it was corrected by my brother

  • @et3limtech346
    @et3limtech346 6 หลายเดือนก่อน +1

    Brother please solve this
    py", line 5, in
    from seleniumwire.thirdparty.mitmproxy import optmanager
    File "C:\Users\ahmed\AppData\Roaming\Python\Python312\site-packages\seleniumwire\thirdparty\mitmproxy\optmanager.py", line 9, in
    import blinker._saferef
    ModuleNotFoundError: No module named 'blinker._saferef' in seleniumwire And also a download library blinker please help and reply

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

      Check this out: www.marekrost.cz/selenium-wire-how-to-resolve-blinker-saferef