Skip to content

Commit

Permalink
增强response的解码
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris-code committed Jul 15, 2021
1 parent 33f7828 commit d9ebbbd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion feapder/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.9
1.6.0
5 changes: 4 additions & 1 deletion feapder/network/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,10 @@ def __text(self):
def text(self):
if self._cached_text is None:
if self.encoding and self.encoding.upper() != FAIL_ENCODING:
self._cached_text = self.__text
try:
self._cached_text = self.__text
except UnicodeDecodeError:
self._cached_text = self._get_unicode_html(self.content)
else:
self._cached_text = self._get_unicode_html(self.content)

Expand Down

0 comments on commit d9ebbbd

Please sign in to comment.