From c8e8d455a2589d7ba4e4a9eb83943c4b718e8591 Mon Sep 17 00:00:00 2001 From: Chaiwat Suttipongsakul Date: Wed, 23 Jan 2019 15:43:40 +0700 Subject: [PATCH] force UTF-8 text encoding --- utils/opengraph.py | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/opengraph.py b/utils/opengraph.py index 318b1bc..df59732 100644 --- a/utils/opengraph.py +++ b/utils/opengraph.py @@ -48,6 +48,7 @@ def fetch_og_metadata(user_agent, links): logger.debug(f"skipping {l}") continue + r.encoding = 'UTF-8' html = r.text try: data = dict(opengraph.OpenGraph(html=html))