From c39acbcc8e4cd7fcdec906d144bda313dd236b18 Mon Sep 17 00:00:00 2001 From: Christoph Stahl Date: Mon, 15 Mar 2021 19:37:44 +0100 Subject: [PATCH] Use Response.text instead of Response.content `content` returns a bytes object, `text` returns a string object. The latter can be splitted by the string `\n`, the former cannot, which leads to an Exception. --- core/auto_process/comics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/auto_process/comics.py b/core/auto_process/comics.py index bb884404..e8719bba 100644 --- a/core/auto_process/comics.py +++ b/core/auto_process/comics.py @@ -76,7 +76,7 @@ def process(section, dir_name, input_name=None, status=0, client_agent='manual', status_code=1, ) - result = r.content + result = r.text if not type(result) == list: result = result.split('\n') for line in result: