diff --git a/DrissionPage/session_page.py b/DrissionPage/session_page.py index f22dca8..16d612b 100644 --- a/DrissionPage/session_page.py +++ b/DrissionPage/session_page.py @@ -364,7 +364,7 @@ class SessionPage(object): try: charset = re_result.group(1) except: - charset = 'utf-8' + charset = r.apparent_encoding else: charset = headers['Content-Type'].split('=')[1] # 避免存在退格符导致乱码或解析出错