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

Поделиться
HTML-код
  • Опубликовано: 29 окт 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

  • @hellototech
    @hellototech 2 года назад +2

    thank you for this tutorial, really helpful

  • @Nathan2904
    @Nathan2904 9 месяцев назад +1

    grats bro, your videos helped me a lot.

  • @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

  • @gijoo.x
    @gijoo.x 2 года назад +1

    thank you for these tutorials keep it up

  • @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!

  • @Helza99
    @Helza99 8 месяцев назад +1

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

    • @MichaelKitas
      @MichaelKitas  5 месяцев назад

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

  • @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

  • @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: ruclips.net/video/QvaZLa_FKmY/видео.html

  • @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

  • @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

  • @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.

  • @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

  • @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

  • @et3limtech346
    @et3limtech346 5 месяцев назад +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  5 месяцев назад

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