fbchat-dev / fbchat-dev/fbchat
Error with logout function
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 403
- PR merge metrics
- No merged PRs in 30d
Description
## Description of the problem
When trying to logout an active session created from session cookies, an error occurs.
## Code to reproduce
```
session = fbchat.Session.from_cookies(cookie)
client = fbchat.Client(session=session)
session.logout()
```
## Traceback
```
Traceback (most recent call last):
File "", line 1, in
File "/.../fbchat-master/fbchat/_session.py", line 289, in logout
logout_h = re.search(r'name=\\"h\\" value=\\"(.*?)\\"', h_r.text).group(1)
AttributeError: 'NoneType' object has no attribute 'group'
```
## Environment information
- Python3.5
- `fbchat` 2.0.0a2
This error is not exclusive to v2. I'm getting same error using version 1.8.1 of fbchat. However I don't know if this error already existed or if a modification of fb handling of logout broke something (I've never used this functionality).
Contributor guide
Assessment
This issue has not been assessed yet.