From 7b5af0038d7645e4194a204164815846a31e4377 Mon Sep 17 00:00:00 2001 From: Richie Date: Mon, 24 Oct 2016 10:59:59 -0400 Subject: [PATCH] Update for Spring 2017 catalog --- app/views/static/index.html.erb | 2 +- lib/catalog/rpi_adapter.rb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/static/index.html.erb b/app/views/static/index.html.erb index 7117b690..08a5585f 100644 --- a/app/views/static/index.html.erb +++ b/app/views/static/index.html.erb @@ -6,7 +6,7 @@ - + diff --git a/lib/catalog/rpi_adapter.rb b/lib/catalog/rpi_adapter.rb index 43e97590..52803b37 100644 --- a/lib/catalog/rpi_adapter.rb +++ b/lib/catalog/rpi_adapter.rb @@ -46,7 +46,7 @@ def update_section_seats private def sem_string - "201609" + "201701" end def load_courses @@ -147,8 +147,8 @@ def update_courses def load_descriptions base = "http://catalog.rpi.edu/" page_no = 1 - while page_no <= 20 do - path = "content.php?catoid=14&catoid=14&navoid=336&filter%5Bitem_type%5D=3&filter%5Bonly_active%5D=1&filter%5B3%5D=1&filter%5Bcpage%5D="+page_no.to_s+"#acalog_template_course_filter" + while page_no <= 19 do + path = "content.php?catoid=15&navoid=367&filter%5Bcpage%5D=" + page_no.to_s page = base + path page = Nokogiri::HTML(open(page)) page_no += 1 @@ -167,7 +167,7 @@ def load_descriptions desc = desc_page.css('td.block_content') course_description = desc.text course_description.slice! "HELP" - course_description.slice! "Rensselaer Catalog 2015-2016" + course_description.slice! "Rensselaer Catalog 2016-2017" course_description.slice! "Print-Friendly Page [Add to Portfolio]" course_description.slice! " Back to Top | Print-Friendly Page [Add to Portfolio]" course_description = course_description.strip