Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

jonahgeorge/osu-course-catalog

Repository files navigation

OSU Course Catalog Scraper

Gem Version Build Status Inline docs

A script to gather course data from Oregon State University's Course Catalog.

Warning! Use of this gem may be against Oregon State University's Acceptable Use Policy.

Example

# Description: Prints course data to stdout in csv format.
# Usage:       ruby examples/basic.rb > courses_$(date +%Y%m%d).csv

require "osu-cc-scraper"
require "csv"

puts %w(Department Number Name Term CRN Section Instructor
        Campus Type Status Capacity Current).to_csv

university = OsuCcScraper::University.new

university.departments.each do |department|
  department.courses.each do |course|
    course.sections.each do |section|
      puts section.to_a.to_csv
    end
  end
end

About

A gem for accessing the OSU Course Catalog

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published