Pyppeteer is actually a great choice for this! It’s a Python port of Puppeteer, so it’s perfect for scraping API calls.
Example:
```python
import asyncio
from pyppeteer import launch
async def main():
browser = await launch()
page = await browser.newPage()
await page.goto('https://example.com')
await page.waitFor(2000) # wait for calls
print(await page.evaluate('window.performance.getEntries()'))
asyncio.get_event_loop().run_until_complete(main())
```
This logs all network requests, including API calls.
Example:
```python
import asyncio
from pyppeteer import launch
async def main():
browser = await launch()
page = await browser.newPage()
await page.goto('https://example.com')
await page.waitFor(2000) # wait for calls
print(await page.evaluate('window.performance.getEntries()'))
asyncio.get_event_loop().run_until_complete(main())
```
This logs all network requests, including API calls.
