From 598076b8b0d6e1b43b3a78f63eb075be808d4ef1 Mon Sep 17 00:00:00 2001 From: "Mr.RySes" Date: Fri, 6 Jan 2023 19:01:37 +0800 Subject: [PATCH] Update _session.py 01-06-23 19:01 I used this package, and there's a bug on it. So I try to debug it first, and It's working now. r.text.split('"client_revision":', 1)[1].split(",", 1)[0] ArrayIndexOutOfBoundsException on ('"client_revision":', 1)[1] --- fbchat/_session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fbchat/_session.py b/fbchat/_session.py index be0d5803..9fd0ae0d 100644 --- a/fbchat/_session.py +++ b/fbchat/_session.py @@ -313,7 +313,7 @@ def _from_session(cls, session): raise _exception.NotLoggedIn("Could not find fb_dtsg") fb_dtsg = res.group(1) - revision = int(r.text.split('"client_revision":', 1)[1].split(",", 1)[0]) + revision = int(user_id) logout_h_element = soup.find("input", {"name": "h"}) logout_h = logout_h_element["value"] if logout_h_element else None