aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/text.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2020-10-25 17:59:22 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2020-10-25 17:59:22 -0400
commit5dc7d6f5902ddaee5223d041d5c10060f0c72430 (patch)
tree6ddd103a86ea7bbb0d695f5fdfa55e43f04756ca /gallery_dl/text.py
parente0c914765184ebbf99cffdecfe8cdbe10f42486e (diff)
New upstream version 1.15.2.upstream/1.15.2
Diffstat (limited to 'gallery_dl/text.py')
-rw-r--r--gallery_dl/text.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gallery_dl/text.py b/gallery_dl/text.py
index 9a716f9..8b06384 100644
--- a/gallery_dl/text.py
+++ b/gallery_dl/text.py
@@ -70,7 +70,7 @@ def ensure_http_scheme(url, scheme="https://"):
def filename_from_url(url):
"""Extract the last part of an URL to use as a filename"""
try:
- return urllib.parse.urlsplit(url).path.rpartition("/")[2]
+ return url.partition("?")[0].rpartition("/")[2]
except (TypeError, AttributeError):
return ""