Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
813219cd9c | ||
|
bb1f7d9294 |
@@ -1,5 +1,5 @@
|
|||||||
[bumpversion]
|
[bumpversion]
|
||||||
current_version = 1.8.2
|
current_version = 1.8.3
|
||||||
commit = True
|
commit = True
|
||||||
tag = True
|
tag = True
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@ from ._client import Client
|
|||||||
from ._util import log # TODO: Remove this (from examples too)
|
from ._util import log # TODO: Remove this (from examples too)
|
||||||
|
|
||||||
__title__ = "fbchat"
|
__title__ = "fbchat"
|
||||||
__version__ = "1.8.2"
|
__version__ = "1.8.3"
|
||||||
__description__ = "Facebook Chat (Messenger) for Python"
|
__description__ = "Facebook Chat (Messenger) for Python"
|
||||||
|
|
||||||
__copyright__ = "Copyright 2015 - 2019 by Taehoon Kim"
|
__copyright__ = "Copyright 2015 - 2019 by Taehoon Kim"
|
||||||
|
@@ -219,11 +219,12 @@ def get_files_from_urls(file_urls):
|
|||||||
r = requests.get(file_url)
|
r = requests.get(file_url)
|
||||||
# We could possibly use r.headers.get('Content-Disposition'), see
|
# We could possibly use r.headers.get('Content-Disposition'), see
|
||||||
# https://stackoverflow.com/a/37060758
|
# https://stackoverflow.com/a/37060758
|
||||||
|
file_name = basename(file_url).split("?")[0].split("#")[0]
|
||||||
files.append(
|
files.append(
|
||||||
(
|
(
|
||||||
basename(file_url).split("?")[0].split("#")[0],
|
file_name,
|
||||||
r.content,
|
r.content,
|
||||||
r.headers.get("Content-Type") or guess_type(file_url)[0],
|
r.headers.get("Content-Type") or guess_type(file_name)[0],
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
return files
|
return files
|
||||||
|
Reference in New Issue
Block a user