diff options
| author | 2019-11-26 14:34:48 +0000 | |
|---|---|---|
| committer | 2019-11-26 14:34:48 +0000 | |
| commit | e4a5bd01e9e43df2e947d34e5e515002d59ddb30 (patch) | |
| tree | 32fffd1236f437125e99851ae709170bd1886b54 /src | |
| parent | `page` is already a soup (diff) | |
| signature | ||
explicitly use "lxml" for finding page encoding
Diffstat (limited to 'src')
| -rw-r--r-- | src/utils/http.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/http.py b/src/utils/http.py index b21d6e70..699c48f1 100644 --- a/src/utils/http.py +++ b/src/utils/http.py @@ -137,7 +137,7 @@ def _meta_content(s: str) -> typing.Dict[str, str]: return out def _find_encoding(data: bytes) -> typing.Optional[str]: - soup = bs4.BeautifulSoup(data) + soup = bs4.BeautifulSoup(data, "lxml") if not soup.meta == None: meta_charset = soup.meta.get("charset") if not meta_charset == None: |
