Web Scraping With NODRIVER

Web Scraping With NODRIVER in 2025

In this guide, I’ll walk you through what NODRIVER is, why it’s different, and how you can use it to build your web scrapers — even if you’re brand new to coding or scraping.

What Is NODRIVER?

NODRIVER is a Python-based browser automation tool. It allows you to open websites, interact with them, and collect data — all through code.

Unlike many scraping tools, NODRIVER doesn’t depend on Selenium or Puppeteer. It doesn’t use ChromeDriver either. Instead, it uses its method to control the browser. This gives it a few advantages:

  • It avoids detection better than traditional tools.
  • It has fewer setup requirements.
  • It supports modern async programming.

Improve Your Scraping with MCP Servers

If you need a simple and cheapsolution for large-scale or complex web scraping, including sites with CAPTCHAs, or advanced anti-bot protection, then you should consider Bright Data’s Model Context Protocol (MCP).

I am not affiliated with Bright Data, I just really like using MCP servers. Their MCP server gives you access to ALL their products from one place. Check all the available tools.

Now, let’s get back to NODRIVER!

Why Use NODRIVER for Web Scraping?

Many tools like Selenium, Playwright, and Puppeteer already exist. So, why should anyone consider NODRIVER?

Here are a few reasons:

1. No External Drivers

Traditional tools like Selenium need ChromeDriver, which can be annoying to install and keep updated. NODRIVER doesn’t need that. You just need Python and a Chrome-based browser (like Chrome or Brave).

2. Simple Setup

You can install NODRIVER with just one command:

pip install nodriver

No other setup is needed. You don’t have to deal with complicated paths or system variables.

3. Asynchronous by Design

Most scraping libraries are synchronous. That means they run one task at a time. NODRIVER uses async functions, which let you do more in less time — perfect for scraping multiple pages at once.

4. Better at Avoiding Detection

Websites are getting smarter about detecting bots. Since NODRIVER doesn’t follow the same patterns as Selenium or Puppeteer, it can avoid detection in some cases.

Setting Up Your First NODRIVER Script

Let’s walk through the steps to scrape a simple website using NODRIVER.

Step 1: Install NODRIVER

Open your terminal and run:

pip install nodriver

Make sure you also have Python 3.7 installed.

Step 2: Write a Basic Script

Here’s a basic skeleton of a NODRIVER script:

import nodriver
async def main():
browser = await nodriver.start()
page = await browser.get("https://example.com")
await page.close()
if __name__ == '__main__':
nodriver.loop().run_until_complete(main())

This script opens the browser, visits a website, and then closes it.

Navigating Pages and Collecting Data

Now let’s dig deeper and see how you can collect real data.

Example: Scraping Quotes from a Website

Let’s say you want to collect quotes from a website like https://quotes.toscrape.com. This site was made for practice scraping.

Here’s how to collect all the quotes on one page:

import nodriver
async def main():
browser = await nodriver.start()
page = await browser.get("https://quotes.toscrape.com")
quotes = await page.select_all("div.quote")
for quote in quotes:
text = (await quote.query_selector("span.text")).text
author = (await quote.query_selector("small.author")).text
print(f"{text} - {author}")
await page.close()
if __name__ == '__main__':
nodriver.loop().run_until_complete(main())

Handling Multiple Pages

Many websites split data across multiple pages. This is called pagination.

To handle that, you need to detect the “Next” button and keep visiting new pages until it’s gone.

Here’s how:

import nodriver
async def main():
browser = await nodriver.start()
base_url = "https://quotes.toscrape.com"
next_url = "/"
while next_url:
page = await browser.get(base_url   next_url)
quotes = await page.select_all("div.quote")
for quote in quotes:
text = (await quote.query_selector("span.text")).text
author = (await quote.query_selector("small.author")).text
print(f"{text} - {author}")
next_btn = await page.select("li.next > a")
if next_btn:
attrs = next_btn.attributes
for i in range(len(attrs)):
if attrs[i] == "href":
next_url = attrs[i 1]
break
else:
next_url = None
await page.close()
if __name__ == '__main__':
nodriver.loop().run_until_complete(main())

This version goes through all the pages and prints every quote it finds.

Extracting and Storing Data

Instead of printing the data, you can save it in a file. JSON is a good format for this.

Here’s how to store the scraped quotes in a JSON file:

import nodriver
import json
async def main():
browser = await nodriver.start()
base_url = "https://quotes.toscrape.com"
next_url = "/"
data = []
while next_url:
page = await browser.get(base_url   next_url)
quotes = await page.select_all("div.quote")
for quote in quotes:
text = (await quote.query_selector("span.text")).text
author = (await quote.query_selector("small.author")).text
tags = [tag.text for tag in await quote.query_selector_all("a.tag")]
data.append({
"quote": text,
"author": author,
"tags": tags
})
next_btn = await page.select("li.next > a")
if next_btn:
attrs = next_btn.attributes
for i in range(len(attrs)):
if attrs[i] == "href":
next_url = attrs[i 1]
break
else:
next_url = None
await page.close()
with open("quotes.json", "w", encoding="utf-8") as f:
json.dump(data, f, ensure_ascii=False, indent=4)
if __name__ == '__main__':
nodriver.loop().run_until_complete(main())

After running this, you’ll get a quotes.json file with all the scraped content.

Current Challenges With NODRIVER

Although NODRIVER is powerful, it’s still new. That means there are some bugs and missing features.

1. Headless Mode May Not Work

Running NODRIVER without showing the browser (in headless mode) sometimes fails. This could be a bug or a feature for avoiding bot detection.

2. Attribute Extraction Is Not Smooth

When you try to get an element’s attribute, NODRIVER returns a list instead of a dictionary. This makes it harder to work with. For example:

attrs = element.attributes

# [‘href’, ‘/page/2/’]

You have to loop through this list to find what you need.

3. Limited Proxy Support

Using proxies is important for serious scraping. NODRIVER has a create_context() method, but there’s not enough documentation. It may work in the future, but for now, it’s hit or miss.

Good Use Cases for NODRIVER

NODRIVER is great for:

  • Learning async scraping
  • Avoiding simple bot detection
  • Scraping smaller websites
  • Testing ideas quickly

If you’re working on a complex project with login flows, CAPTCHA, or IP bans, you might still need Selenium or Playwright for now.

Alternatives to NODRIVER

If NODRIVER doesn’t fit your needs, here are some solid tools to consider:

Playwright

  • Fully async
  • Supports headless mode
  • Built-in support for waiting, authentication, and file downloads

Selenium

  • Very mature
  • Supports many browsers
  • Big community and lots of tutorials

Scrapy

  • Best for large-scale scraping
  • Works with selectors and pipelines
  • Built for crawling multiple pages and storing data

The Future of NODRIVER

NODRIVER is still growing. The developer behind it is also the creator of Undetected Chromedriver, which was popular for avoiding bot detection. That background gives us confidence that NODRIVER will become more stable over time.

Features we expect to see soon:

  • Better attribute handling
  • Full proxy support
  • Improved page interactions like clicking and typing
  • Working headless mode

Conclusion

Web scraping in 2025 is faster and easier with tools like NODRIVER. It allows you to build simple and fast scrapers with little setup. NODRIVER is lightweight and easy to use. It works without needing Selenium or Puppeteer. This makes it great for small projects or learning async scraping.

However, it still has some bugs. It doesn’t fully support proxies, CAPTCHAs, or headless mode yet. For more advanced needs, tools like Playwright or Selenium are better choices. But if you want to test ideas quickly, NODRIVER is a great option. It’s one of the most interesting tools for scraping today.

Similar Posts