Commit 834a287d authored by Zac Wood's avatar Zac Wood

add back subjects to seeds

parent c55ca2b3
Pipeline #5321 passed with stage
in 11 seconds
......@@ -8,7 +8,7 @@ def nbsp
end
def get_courses(subj)
response = HTTParty.get("https://catalog.gmu.edu/courses/#{subj}")
response = HTTParty.get("https://catalog.gmu.edu/courses/#{subj}/")
document = Nokogiri::HTML(response)
course_blocks = document.css('.courseblock')
......
......@@ -127,11 +127,11 @@ def main
semesters.each { |s| subjects.merge(parser.parse_subjects(s[:value])) }
subjects = subjects.to_a
# puts "\tParsing courses from catalog.gmu.edu..."
# courses = parse_courses(subjects) if courses.nil?
puts "\tParsing courses from catalog.gmu.edu..."
courses = parse_courses(subjects) if courses.nil?
# puts "\tLoading courses..."
# load_courses(courses)
puts "\tLoading courses..."
load_courses(courses)
semesters.each do |semester|
puts "#{semester[:season]} #{semester[:year]}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment