Python guides
Every published Python guide, newest first, with practical examples you can copy into your own project.
3,965 guides across 14 topics
Topics
Popular Python guides
Most readLatest Python guides
Page 50 of 179Python Scrapy: CSS, XPath, and Link Following
Learn how to select data with CSS and XPath in Scrapy and how to follow links with response.follow or CrawlSpider rules.
Python Scrapy Spider: Requests, Responses, and Selectors
Learn how Request, Response, and Selector objects work together in a Python Scrapy spider, from issuing requests to parsing pages with CSS and XPath.
Python Playwright vs Selenium: Which to Use?
Compare Python Playwright and Selenium for browser automation: installation, API design, selectors, waits, parallelism, browser support, and when to choose each.
How to Scrape Multiple Pages Concurrently with Python Playwright's Async API
Use Python Playwright's async API to scrape multiple pages concurrently. This article covers asyncio.gather, browser context isolation, concurrency limits, retries, and rate limiting.
Python Playwright Proxy, User Agent, and Headless Browser
Configure a Python Playwright browser with a proxy, custom user agent, and headless mode. Learn where each setting belongs, how to manage multiple proxy contexts, and how to debug common failures.
Python Playwright Network Interception and Blocking Requests
python playwright network interception and blocking requests: Control network traffic in Python Playwright: intercept requests, block unwanted resources, and modify re...
Python Playwright: Iframes, Tabs, and Multiple Pages
Work with iframes, tabs, and multiple pages in Python Playwright using frame_locator, content_frame, expect_popup, expect_page, and context.pages.
Python Playwright: File Upload, Download, and Screenshots
Learn how to automate file uploads, downloads, and screenshots in Python Playwright. Covers set_input_files, file chooser events, expect_download, and screenshot modes with code examples.
Python Playwright: Save and Reuse Login Session
Learn how to save a Python Playwright login session with storage_state and reuse it in later runs to avoid repeated logins.
Python Playwright: Browser Context, Cookies, and Authentication
Understand how browser contexts isolate cookies and authentication state in Python Playwright. Save and restore sessions with storage_state, or inject cookies directly for reusable login flows.