This thread is trying to answer question "How to use a library to catch a fetch request whose Request Url contains the Url I need and output its contents to the Python console?"
Using expect_request you can return the api response for a specific endpoint. Here is that documentation for doing that. https://playwright.dev/python/docs/network
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email email@example.com.