Skip to content

Commit

Permalink
Include bottomtext section in master JSON (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbertrand authored Oct 21, 2020
1 parent 9687458 commit accdc6f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions ocw_data_parser/ocw_data_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ def _compose_page_dict(j):
"title": j.get("title"),
"short_page_title": j.get("short_page_title"),
"text": j.get("text"),
"bottomtext": j.get("bottomtext"),
"url": url_data,
"short_url": j.get("id"),
"description": j.get("description"),
Expand Down
1 change: 1 addition & 0 deletions ocw_data_parser/ocw_data_parser_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ def test_course_pages(ocw_parser):
'file_location': 'ede17211bd49ea166ed701f09c1de288_syllabus.html',
'short_url': 'syllabus',
'url': '/courses/mathematics/18-06-linear-algebra-spring-2010/syllabus',
'bottomtext': '<p>Sample Bottom Text</p>'
}
assert page["text"].startswith("<h2 class=\"subhead\">Course Meeting Times")
assert page["description"].startswith("This syllabus section provides information on course goals")
2 changes: 1 addition & 1 deletion ocw_data_parser/test_json/course_dir/course-1/jsons/3.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"effectiveDate": "2010/09/03 02:55:27.128 GMT-4",
"parent_module": "aabc44bdb2e45374d62f30f2a6d4c63e",
"is_mathml_document": false,
"bottomtext": "",
"bottomtext": "<p>Sample Bottom Text</p>",
"short_page_title": "Syllabus",
"section_identifier": null,
"related_mit_links": "",
Expand Down

0 comments on commit accdc6f

Please sign in to comment.