From 61fe8e05917f2e5525dfc8d2d30c2846d28c4e69 Mon Sep 17 00:00:00 2001 From: Davte Date: Wed, 12 Feb 2020 15:34:54 +0100 Subject: [PATCH] Pass `errors` parameter in `async_request` function --- davtelepot/__init__.py | 2 +- davtelepot/utilities.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/davtelepot/__init__.py b/davtelepot/__init__.py index 0a4f9be..a862df0 100644 --- a/davtelepot/__init__.py +++ b/davtelepot/__init__.py @@ -14,7 +14,7 @@ __author__ = "Davide Testa" __email__ = "davide@davte.it" __credits__ = ["Marco Origlia", "Nick Lee @Nickoala"] __license__ = "GNU General Public License v3.0" -__version__ = "2.3.25" +__version__ = "2.3.26" __maintainer__ = "Davide Testa" __contact__ = "t.me/davte" diff --git a/davtelepot/utilities.py b/davtelepot/utilities.py index f29f4bf..ab85bf0 100644 --- a/davtelepot/utilities.py +++ b/davtelepot/utilities.py @@ -161,7 +161,7 @@ async def async_post(url, mode='html', **kwargs): ) -async def async_request(url, type='get', mode='json', encoding=None, +async def async_request(url, type='get', mode='json', encoding=None, errors='strict', **kwargs): """Make an async html request. @@ -185,7 +185,7 @@ async def async_request(url, type='get', mode='json', encoding=None, else s.post(url, timeout=30, data=kwargs) ) as r: if mode in ['html', 'json', 'string']: - result = await r.text(encoding=encoding) + result = await r.text(encoding=encoding, errors=errors) else: result = await r.read() if encoding is not None: