ScrapeGraphAI with Ollama: local web scraping setup

Learn to set up ScrapeGraphAI with Ollama, Llama 3.2 and nomic-embed-text, then use a Python script to extract article titles from a blog.

Player not loading? Watch on YouTube

This tutorial, uploaded on December 26, 2024, demonstrates web scraping with ScrapeGraphAI and Ollama. The example uses Llama 3.2 and nomic-embed-text; the speaker does not identify exact ScrapeGraphAI or Ollama versions. The installation steps reflect that dated setup.

The speaker creates a Conda environment on Linux with Ollama already installed. His machine has an NVIDIA RTX A6000 with 48 GB of VRAM, though he does not establish that hardware as a minimum requirement. He explains the two model roles: the local LLM handles language tasks, while the embedding model converts text into numerical representations. The setup also includes browser automation dependencies and asynchronous I/O support.

The Python example configures the models through a local Ollama endpoint, supplies a website URL and asks the scraper to list article titles. The script returns some titles from the speaker's blog. He interprets these as results from the first page, so the demonstration does not establish complete extraction across the site.

The speaker describes this configuration as private and requiring no API key. Model inference runs locally in the example, while the scraper accesses a website. The walkthrough therefore demonstrates local processing rather than an offline workflow.