Skip to content

Instantly share code, notes, and snippets.

View snuorch's full-sized avatar
🏠
Working from home

Salvatore snuorch

🏠
Working from home
  • Switzerland
  • 10:18 (UTC +02:00)
View GitHub Profile
@snuorch
snuorch / selenium_xhr_requests_via_performance_logging.py
Last active June 29, 2023 14:25 — forked from lorey/selenium_xhr_requests_via_performance_logging.py
Access Chrome's network tab (e.g. XHR requests) with Selenium
#
# This small example shows you how to access JS-based requests via Selenium
# Like this, one can access raw data for scraping,
# for example on many JS-intensive/React-based websites
#
import json
from time import sleep
from selenium import webdriver
from selenium.webdriver import DesiredCapabilities