try parsing response as utf-8
This commit is contained in:
parent
bc07dcbe5e
commit
b4f7340c8c
1
e3372.py
1
e3372.py
@ -66,6 +66,7 @@ class WebAPI:
|
||||
def request(self, endpoint: str, data=None):
|
||||
url = f'http://{self.ip}/api/{endpoint}'
|
||||
r = requests.get(url, headers=self.headers) if data is None else requests.post(url, data=data, headers=self.headers)
|
||||
r.encoding = 'utf-8'
|
||||
|
||||
soup = BeautifulSoup(r.text, 'lxml-xml')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user