Skip to content

Commit

Permalink
parsing: fix jhu prereq, update fakeuseragent (#1061)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnm364 authored and noahpresler committed Nov 6, 2017
1 parent 3a18017 commit ab995ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions parsing/schools/jhu/courses.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ def _load_ingestor(self, course, section):
for p in section_details[0]['Prerequisites']:
prereqs.append(p['Description'])
self.ingestor['prerequisites'] = ' '.join(prereqs)
else:
self.ingestor['prerequisites'] = ''

self.ingestor['level'] = re.findall(re.compile(r".+?\..+?\.(.{1}).+"),
course['OfferingName'])[0] + "00"
Expand All @@ -140,10 +142,6 @@ def _load_ingestor(self, course, section):
self.ingestor['department_name'] = ' '.join(
course['Department'].split()[1:]
)
# if self.ingestor['department_name'] != 'International Economics':
# return
# print(course, section)
# print(self.ingestor['department_name'])
self.ingestor['campus'] = 1
self.ingestor['exclusions'] = section_details[0].get(
'EnrollmentRestrictedTo'
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ django-picklefield==0.3.2
djangorestframework==3.6.2
django-rest-swagger==2.1.2
django-webpack-loader==0.4.1
fake-useragent==0.1.5
fake-useragent==0.1.8
fuzzywuzzy==0.10.0
google-api-python-client==1.6.1
gunicorn==17.5
Expand Down

0 comments on commit ab995ae

Please sign in to comment.