assume utf8 encoding

This commit is contained in:
2019-09-10 14:02:36 -04:00
parent 06d6762d51
commit 8f8c4f23f0
7 changed files with 21 additions and 12 deletions

View File

@@ -42,7 +42,7 @@ class MayuriChanHelper(ChanHelper):
def parse_threads_list(self, r):
try:
j = json.loads(r.text)
j = json.loads(r.content.decode('utf-8', 'ignore'))
except JSONDecodeError:
logger.warning("JSONDecodeError for %s:" % (r.url,))
logger.warning(r.text)
@@ -54,7 +54,7 @@ class MayuriChanHelper(ChanHelper):
@staticmethod
def parse_thread(r):
try:
j = json.loads(r.text)
j = json.loads(r.content.decode('utf-8', 'ignore'))
except JSONDecodeError:
logger.warning("JSONDecodeError for %s:" % (r.url,))
logger.warning(r.text)