NEWScrapingAnt MCP for Claude Code, Cursor & Windsurf — try it free →
Skip to main content

28 posts tagged with "playwright"

View All Tags

How to Scrape Google Flights

· 8 min read
Satyam Tripathi
Satyam is a junior data engineer and seasoned blogger. He has created several top-ranked tutorials on different topics like web scraping, automation, and scraping tools. He is always open to working with new technologies in the market and sharing his knowledge.

How to Scrape Google Flights

Google Flights collects information from different airlines and travel companies to show you all the flights available, their prices, and schedules. This helps travellers to compare airline prices, check flight durations, even track environmental impact, and at last find the best deals.

Playwright Local Storage: Set Before Load and Validate Data

· 10 min read
Oleg Kulyk
Co-Founder @ ScrapingAnt

Playwright localStorage initialization and extracted data

Updated 2026-09-27

Replaced unsupported performance percentages and broken advanced recipes with runnable Chromium and Firefox experiments. The examples now distinguish startup state, current stored values and the records actually extracted.

To change localStorage on an already loaded origin, use page.evaluate(). If the application reads that value during startup, install an origin-guarded context.add_init_script() before navigation, or create the context with the required storage_state.

That timing matters when scraping. In our catalog fixture, setting the region to eu after the table had loaded changed the stored value but left four US-priced rows on screen. A reload produced the intended EUR records. A successful storage write alone did not validate the data.

Playwright Stealth: 5 Libraries Tested Against Bot Detectors

· 13 min read
Satyam Tripathi
Satyam is a junior data engineer and seasoned blogger. He has created several top-ranked tutorials on different topics like web scraping, automation, and scraping tools. He is always open to working with new technologies in the market and sharing his knowledge.

Playwright Stealth: 5 Libraries Tested Against Bot Detectors

Updated 2026-09-22

Replaced the legacy Playwright 1.40 recipe and historical screenshots with five library integrations, plain-browser controls and dated BrowserScan/Sannysoft observations. A diagnostic result does not establish that a scraper is undetectable or will reach a protected target. The tested code, raw results and screenshots preserve both successful captures and excluded harness errors.

Which Playwright stealth library should you use? In this comparison, Patchright returned BrowserScan's Normal verdict when headed, while its headless user agent was flagged. Node's playwright-extra with the stealth plugin and the Firefox-based Camoufox returned Normal in both modes. Python playwright-stealth had no failed Sannysoft checks but still received BrowserScan's Navigator flag.

That difference is the useful result: changing a browser property, passing a diagnostic page and successfully retrieving your target are separate tests. Start with a reproducible control and keep the browser version, operating system and launch mode attached to every observation.

Playwright Cookies: Save State and Share Sessions with API Requests

· 12 min read
Oleg Kulyk
Co-Founder @ ScrapingAnt

Playwright Cookies: Save State and Share Sessions with API Requests

Updated 2026-09-27

Replaced mixed sync/async recipes, manual Set-Cookie parsing and untested state assumptions with runnable Chromium and Firefox experiments. The new examples test context restoration, browser/API cookie sharing, missing local storage and duplicate requests against extracted catalog records. The original URL, banner and publication date are preserved.

To set cookies with Playwright Python, call context.add_cookies() with a list of cookie dictionaries. Supply url, or a suitable domain and path, and set the cookies before navigating when the first request needs them. Use context.storage_state() when the workflow also depends on supported browser storage beyond cookies.

Restoring the cookie does not necessarily restore the dataset. In our catalog, cookies-only restoration kept member pricing but selected USD instead of EUR. A browser-associated API request made the same mistake when it omitted a region parameter that the page normally reads from local storage.

This guide shows the working state handoff and the failures around it. The fixture is self-authored and synthetic; it demonstrates specific mechanisms, not the probability that a real website will accept a restored login.

Playwright vs. Puppeteer in 2024 - Which Should You Choose?

· 9 min read
Satyam Tripathi
Satyam is a junior data engineer and seasoned blogger. He has created several top-ranked tutorials on different topics like web scraping, automation, and scraping tools. He is always open to working with new technologies in the market and sharing his knowledge.

Playwright vs. Puppeteer in 2024: Which Should You Choose?

In the ever-evolving landscape of web automation and testing, two tools have consistently stood out: Playwright and Puppeteer. As of 2024, both have matured significantly, offering robust features for developers and testers alike. Both tools, developed by teams at Microsoft and Google respectively, offer robust solutions for automating browser tasks, but they cater to slightly different needs and preferences.

Playwright vs. Selenium - A Comprehensive Comparison for 2024

· 7 min read
Satyam Tripathi
Satyam is a junior data engineer and seasoned blogger. He has created several top-ranked tutorials on different topics like web scraping, automation, and scraping tools. He is always open to working with new technologies in the market and sharing his knowledge.

Playwright vs. Selenium - A Comprehensive Comparison for 2024

In the rapidly evolving landscape of web automation and testing, two open-source frameworks have emerged as leading tools: Playwright and Selenium. Both frameworks offer unique features and capabilities, making the choice between them a nuanced decision that depends on specific project requirements and team expertise.

Web Scraping with Playwright in 6 Simple Steps

· 11 min read
Oleg Kulyk
Co-Founder @ ScrapingAnt

Web Scraping with Playwright in 6 Simple Steps

Correction (2026-09-28)

Corrected the link-extraction example to print linkUrls, the array it actually constructs. This targeted correction does not claim a new live-site benchmark.

Web scraping is the process of extracting necessary data from external websites. It’s a valuable skill that helps you gather large amounts of data from the internet for various purposes. However, it can be daunting if you don’t need what tools to use.

Puppeteer vs. Selenium - Which Is Better? + Bonus

· 9 min read
Oleg Kulyk
Co-Founder @ ScrapingAnt

Puppeteer Vs. Selenium: Which Is Better?

With the increasing use of the internet worldwide, it is being implemented in all aspects of our daily lives. So using it efficiently and effectively becomes crucial and could be the difference between competitors and businesses. This is where the concept of Web Automation comes in. Today I shall teach you one of the most debated topics of web automation, Puppeteer vs. Selenium.

Let's begin!

Web Scraping with Java

· 16 min read
Oleg Kulyk
Co-Founder @ ScrapingAnt

Web Scraping with Java

Java is one of the most popular and high demanded programming languages nowadays. It allows creating highly-scalable and reliable services as well as multi-threaded data extraction solutions. Let's check out the main concepts of web scraping with Java and review the most popular libraries to setup your data extraction flow.