How to see API call of websites in Chrome using Python? Alternatively, for a slightly more conversational to

22 Replies, 2238 Views

Hey! For how to see api call of websites in chrome python, you can use Playwright—it’s like Selenium but faster and more modern.

Here’s a quick snippet:
```python
from playwright.sync_api import sync_playwright

with sync_playwright() as p:
browser = p.chromium.launch()
page = browser.new_page()
page.goto("https://example.com")
requests = page.context.request.all()
print(requests)
```
Works like a charm and captures all network activity.

Messages In This Thread



Users browsing this thread: 1 Guest(s)