force UTF-8 text encoding

This commit is contained in:
Chaiwat Suttipongsakul 2019-01-23 15:43:40 +07:00
parent 6f44f5cd7d
commit c8e8d455a2

View file

@ -48,6 +48,7 @@ def fetch_og_metadata(user_agent, links):
logger.debug(f"skipping {l}") logger.debug(f"skipping {l}")
continue continue
r.encoding = 'UTF-8'
html = r.text html = r.text
try: try:
data = dict(opengraph.OpenGraph(html=html)) data = dict(opengraph.OpenGraph(html=html))