Compare commits

...

5 Commits

Author SHA1 Message Date
Mads Marquart
0761116335 Bump version: 1.9.6 → 1.9.7 2020-06-08 22:20:43 +02:00
Mads Marquart
86d7220126 Merge pull request #586 from qwertyuu/fix-typeerror-v1
Fix AttributeError on login
2020-06-08 22:19:30 +02:00
Raphaël Côté
e175ec791c Update _state.py 2020-05-31 22:38:08 -04:00
Mads Marquart
e54be7583a Merge pull request #547 from Benjamin-Loison/patch-1
Update fetch.py
2020-04-06 12:53:58 +02:00
Benjamin Loison
fdf64597ec Update fetch.py
Variable name mismatched.
2020-04-06 12:46:34 +02:00
4 changed files with 5 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.9.6
current_version = 1.9.7
commit = True
tag = True

View File

@@ -67,5 +67,5 @@ print("thread's type: {}".format(thread.type))
# Print image url for 20 last images from thread.
images = client.fetchThreadImages("<thread id>")
for image in islice(image, 20):
for image in islice(images, 20):
print(image.large_preview_url)

View File

@@ -13,7 +13,7 @@ from ._client import Client
from ._util import log # TODO: Remove this (from examples too)
__title__ = "fbchat"
__version__ = "1.9.6"
__version__ = "1.9.7"
__description__ = "Facebook Chat (Messenger) for Python"
__copyright__ = "Copyright 2015 - 2019 by Taehoon Kim"

View File

@@ -27,6 +27,8 @@ def find_input_fields(html):
def session_factory(user_agent=None):
session = requests.session()
session.headers["Referer"] = "https://www.facebook.com"
session.headers["Accept"] = "text/html"
# TODO: Deprecate setting the user agent manually
session.headers["User-Agent"] = user_agent or random.choice(_util.USER_AGENTS)
return session