diff --git a/fbchat/_util.py b/fbchat/_util.py index 4e943d5..6b5c489 100644 --- a/fbchat/_util.py +++ b/fbchat/_util.py @@ -288,7 +288,7 @@ def get_files_from_urls(file_urls): # https://stackoverflow.com/a/37060758 files.append( ( - basename(file_url), + basename(file_url).split("?")[0].split("#")[0], r.content, r.headers.get("Content-Type") or guess_type(file_url)[0], )