work around encoding error
This commit is contained in:
parent
6bd60fbfe4
commit
28786d1e5f
|
@ -35,7 +35,7 @@ class BlackboardConnector(object):
|
|||
def _get_course_helper(self, r):
|
||||
r.encoding = 'utf-8'
|
||||
if r.status_code == 200 and r.content.startswith('<'):
|
||||
x = etree.XML(r.content)
|
||||
x = etree.XML(r.content.replace('ISO-8859-1', 'UTF-8'))
|
||||
info_message_elt = x.find('infoMessage')
|
||||
course_elts = x.findall('*/course')
|
||||
courses = []
|
||||
|
@ -117,7 +117,7 @@ class BlackboardConnector(object):
|
|||
def get_categories(self):
|
||||
r = self.send_request('GetCategories')
|
||||
if r.status_code == 200 and r.content.startswith('<'):
|
||||
x = etree.XML(r.content)
|
||||
x = etree.XML(r.content.replace('ISO-8859-1', 'UTF-8'))
|
||||
info_message_elt = x.find('infoMessage')
|
||||
category_elts = x.findall('categories/category')
|
||||
categories = []
|
||||
|
|
Reference in New Issue