Py’otrMuhammad Toheed Sahar

CPE Course Catalogue Scraper

I built a one-file scraper that turns an accounting CPE course catalogue into a clean CSV with 11 fields per course.

Client
Self-initiated demo
Year
2026
Type
Data & pipelines

The problem

A course catalogue is only useful as data if every course has the same fields: credits, instructor, delivery format, subject area, level, prerequisites and price. On the site those sit in free-flowing page text, not in a table.

How I built it

The scraper reads the catalogue's course list, then visits each course page with a browser-grade HTTP client and takes the labelled fields from the page text, plus the page metadata for price and description. Requests are spaced with short random delays, and the output is a UTF-8 CSV that opens cleanly in Excel.

What got hard

  1. The course pages have no stable markup for their fields: labels such as Author, Method, NASBA Category and Level just sit in the text.

    I read each page as ordered text and take the value that follows each label, skipping lines that are only another label, and pull the credit hours with a pattern for forms like '1 Hour' and '1.5 Hours'.

The result

A sample run of 100 courses (the 100 shortest as listed by hours) with every one of the 8 data columns filled on every row, saved as a raw and a cleaned CSV.