0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
A script to gather course data from Oregon State University's Course Catalog.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

~> 2.1.0
 Project Readme

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