This repository has been archived on 2025-07-31 . You can view files and clone it, but cannot push or open issues or pull requests.
97049556ed99be9f401975e45a4e2839138d76e7
fb_dtsg is sometimes returned inside an HTML comment, and beautifulsoup can't find it - in that case we'll use a regular expression to extract it. fb_h is sometimes not returned in the HTML of req_url.BASE (in my experience, when resuming a session using session_cookies). Following the discussion here: https://github.com/Schmavery/facebook-chat-api/issues/505 I learned it is used for logging out, and can be found in the response of `https://www.facebook.com/bluebar/modern_settings_menu/`. I included support for fetching it from there. Because this library is used many more times for logging in, than for logging out, instead of adding an extra HTTP request during login, I decided to perform it during logout, only in case fb_h is not found in the HTML of req_url.BASE.
fbchat: Facebook Chat (Messenger) for Python ============================================ .. image:: https://img.shields.io/badge/license-BSD-blue.svg :target: LICENSE.txt :alt: License: BSD .. image:: https://img.shields.io/badge/python-2.7%2C%203.4%2C%203.5%2C%203.6-blue.svg :target: https://pypi.python.org/pypi/fbchat :alt: Supported python versions: 2.7, 3.4, 3.5 and 3.6 .. image:: https://readthedocs.org/projects/fbchat/badge/?version=master :target: https://fbchat.readthedocs.io :alt: Documentation Facebook Chat (`Messenger <https://www.facebook.com/messages/>`__) for Python. This project was inspired by `facebook-chat-api <https://github.com/Schmavery/facebook-chat-api>`__. **No XMPP or API key is needed**. Just use your email and password. Go to `Read the Docs <https://fbchat.readthedocs.io>`__ to see the full documentation, or jump right into the code by viewing the `examples <examples>`__ Installation: .. code-block:: console $ pip install fbchat Maintainer ---------- - Mads Marquart / `@madsmtm <https://github.com/madsmtm>`__ - Taehoon Kim / `@carpedm20 <http://carpedm20.github.io/about/>`__
Description
Languages
Python
100%