Skip to main content
BETAUnder active development. Some features may not work as expected.

Using Browser DevTools for Web Scraping: The Complete Guide

beginner

Browser DevTools (Developer Tools) is a built-in set of debugging and inspection tools in web browsers. For web scraping, DevTools lets you inspect page structure, find CSS selectors, monitor network requests, and test selectors before writing code.

Opening DevTools

  • Chrome/Edge: F12 or Ctrl+Shift+I (Cmd+Option+I on Mac)
  • Firefox: F12 or Ctrl+Shift+I
  • Safari: Cmd+Option+I (enable in Preferences → Advanced first)

The 4 Tabs Scrapers Use Most

1. Elements Tab (Inspect HTML)

Right-click any element on the page → "Inspect" to jump to its HTML. Use this to:
  • Understand the page structure
  • Find class names and IDs for selectors
  • See how data is organized in the DOM

2. Network Tab (Find APIs)

The most powerful tab for scrapers. Filter by XHR/Fetch to see API calls:
  • Click a request to see its URL, headers, and response
  • Right-click → "Copy as cURL" to get the exact request
  • Find the JSON APIs behind JS-rendered pages

3. Console Tab (Test Selectors)

Test CSS selectors before writing Python code:
javascript
// Find all product cards
document.querySelectorAll(".product-card")

// Get text of first title document.querySelector(".product-card .title").textContent

// Count results document.querySelectorAll(".product-card").length

4. Application Tab (Cookies & Storage)

View and edit cookies, local storage, and session storage. Useful for understanding authentication.

Pro Workflows

Copy a Selector

Right-click an element in the Elements tab → Copy → Copy selector (Warning: auto-generated selectors are often fragile — simplify them)

Copy as cURL

In the Network tab, right-click a request → Copy → Copy as cURL Then convert to Python:
bash
# Use https://curlconverter.com to convert cURL to Python requests

Disable Cache

In the Network tab, check "Disable cache" to see fresh responses every time.

Throttle Network

Simulate slow connections to see how the page loads progressively — useful for finding which API call loads which data.

Learn DevTools hands-on

This glossary entry covers the basics. The Master Web Scraping course teaches you to use devtools in real projects across 16 in-depth chapters.

Get Instant Access — $19

$ need_help?

We're here for you