Skip to content
This repository has been archived by the owner on May 25, 2021. It is now read-only.

Spring 2017 #151

Merged
merged 2 commits into from
Oct 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/static/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<td>
<span id="searchcontainer">
<img id="searchglyph" src="search.svg"/>
<input id="searchbar" placeholder="Search"/>
<input id="searchbar" placeholder="Search Spring 2017"/>
</span>
</td>
<td class="sidelink" id="schedule-btn">
Expand Down
8 changes: 4 additions & 4 deletions lib/catalog/rpi_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def update_section_seats

private
def sem_string
"201609"
"201701"
end

def load_courses
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down