Lego sets

This is a list of all lego sets the kids have, for future reference. Images on this page are from brickset.com. At the bottom of this page are some instructions on how to make a list like this yourself.

Construction Excavator

set number: 60420

Custom Car Garage

set number: 60389

Dog-Grooming Car

set number: 42635

Electric Sports Car

set number: 60383

Fire Helicopter

set number: 60318

Fire Rescue Boat

set number: 60373

Fire Rescue Helicopter

set number: 60411

LEGO City Advent Calendar 2023

set number: 60381

LEGO Friends Advent Calendar 2023

set number: 41758

Monster Truck

set number: 60402

NASA Mars Rover Perseverance

set number: 30682

Off-Road Mountain Truck

set number: 60447

Police Bike Car Chase

set number: 60392

Police Car

set number: 60312

Police Off-Road Buggy Car

set number: 30664

Recycle Truck

set number: 6668

The Armory

set number: 21252

Tow Truck

set number: 60435

Tow Truck Trouble

set number: 60137

Make a list like this for yourself

Create a JSON file with set numbers

This will be just a simple json file with lego set numbers.

[
    60389,
    ...
    60373
]

Get the data

I used a python script to create the markdown file. This script:

resp = http.request("GET", f"https://brickset.com/sets?query={set_number}")
html = resp.data
soup = BeautifulSoup(html, features="html.parser")
image = soup.find("a", {"class": "highslide plain mainimg"})
image_url = image["href"]
ext = os.path.splitext(urlparse(image_url).path)[1]
image_filename = os.path.join(DEST_DIR, f"{set_number}{ext}")
name = soup.find("div", {"class": "highslide-caption"}).find(
    "h1", recursive=False
).text
  • checks if the data was downloaded before
  • downloads the set name, and image
  • generates markdown

Special thanks to kevinquinn for the inspiration.

LEGO, the LEGO logo, the Minifigure, and the Brick and Knob configurations are trademarks of the LEGO Group of Companies. ©2024 The LEGO Group.Brickset, the Brickset logo and all content not covered by The LEGO Group’s copyright is, unless otherwise stated, ©1997-2024 Brickset ltd.