def remove_html_encode_errors(self, headers, error):
"""
Use this method to remove html special characters (Eg. &nbps), encoding errors or other unicode text.
Simply pass headers rows to the method and the error, as a unicode string, you want to correct
:param headers: rows list of headers
:param error: unicode string you want to delete from header cells
:return: nothing
"""
# Iterates over headers
for row in headers:
# Iterate over header cells
for header in row:
# Replace 'error' with u'' in the text of this header cell
header['th'] = header['th'].replace(error, u'')
评论列表
文章目录