All cases

Scrape all products from a website into Excel

The agent wrote and ran a scraper itself: 1,000 books from 50 pages, with prices and ratings, in Excel in 2.5 minutes. And it handed over the script to run later on your own.

The agent worked
5 min
It cost
$0.09
Steps
9
Files
3
Scrape all products from a website into Excel

scrape all the books from this site into excel, title price availability https://books.toscrape.com

08:50
$0.05

Done: I collected 1,000 books from all 50 pages of the catalogue into Excel. Each one has its full title, its price in pounds sterling and its availability.

According to the catalogue, every book is marked as in stock.

08:52

can you add the rating? the stars

08:54

I added the rating as stars for all 1,000 books, for example ★★★☆☆. The other columns are kept.

08:55

send me the script, i want to run it myself later

08:56

Here is the script. It goes through every page of the catalogue and saves the title, price, availability and rating to Excel.

You will need Python to run it. Install the dependencies once:

pip install requests beautifulsoup4 openpyxl

Then run the script from the folder you downloaded it to:

python scrape_books.py

The result is saved to books.xlsx in the current folder. To choose another name or path:

python scrape_books.py --output my_books.xlsx

I checked that it runs: the script collected 1,000 books from 50 pages. If the file already exists, it will be overwritten.

08:57

Problembot

4:39 $0.09

The task

A website's catalogue has to go into a spreadsheet: each book's title, price and availability. books.toscrape.com has 1,000 books on 50 pages, an evening of copy and paste by hand. The person cannot program.

What the agent was told

One sentence with a link to the site. Then: add the rating as stars, and send the script itself, to run it without the agent.

How the agent solved it

The agent looked into how the site is built: how many pages there are and where the title, price and availability sit. Then it wrote a Python script on its computer, ran it over all 50 pages and checked that there were exactly 1,000 rows. It added the rating in a separate pass and matched every row by title. At the end it made the scraper a file of its own, ran it and made sure it again collected 1,000 books.

The result

  • books.xlsx: 1,000 books, the price as a number in pounds, a frozen header row and a filter.
  • books_rating.xlsx: the same plus a "Rating" column in stars.
  • scrape_books.py: a ready scraper with instructions on how to run it.

We checked a sample of rows against the site, and everything matched. The script ran on our machine in 13 seconds and produced the same table. The agent worked for about four and a half minutes over three messages, and it all cost $0.09.

What did not work

  • The rating is written as star characters, not as a number, so sorting or filtering by it is awkward.
  • Availability stayed in English ("In stock").
  • The script's instructions assume Python is already installed. The agent did not explain how to install it or where to type the commands.
  • Every book on the site is in stock, so the "Availability" column filters nothing out here. The agent said so plainly.

What it used

Its own computer in the cloud
The agent has a real Linux machine with Python, Node.js, Docker and a browser. It installs software, runs code and keeps your files between dialogs.
Spreadsheets, Excel and data analysis
Send an export or an Excel sheet. The agent calculates, summarizes, draws charts and sends back a finished file.
Files in, files out
Send the agent documents, spreadsheets, photos and videos. It hands finished files back right in the chat.