aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/utils/http.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/http.py b/src/utils/http.py
index 699c48f1..83d6523b 100644
--- a/src/utils/http.py
+++ b/src/utils/http.py
@@ -122,8 +122,8 @@ class Response(object):
self.encoding = encoding
self.headers = headers
self.cookies = cookies
- def decode(self, encoding="utf8") -> str:
- return self.data.decode(encoding)
+ def decode(self, encoding: typing.Optional[str]=None) -> str:
+ return self.data.decode(encoding or self.encoding)
def json(self) -> typing.Any:
return _json.loads(self.data)
def soup(self, parser: str="lxml") -> bs4.BeautifulSoup: