Skip to content
This repository was archived by the owner on Jul 1, 2022. It is now read-only.

Commit 8283ebc

Browse files
committed
Trim Content-Type header to skip extra parts, #35
This happens with HTML files for example: text/html; charset=utf-8
1 parent 29b2454 commit 8283ebc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dagr/dagr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class Dagr:
6363
"""deviantArt gallery ripper class"""
6464

6565
NAME = basename(__file__)
66-
__version__ = "0.71.1"
66+
__version__ = "0.71.2"
6767
MAX_DEVIATIONS = 1000000 # max deviations
6868
ART_PATTERN = (r"https://www\.deviantart\.com/"
6969
r"[a-zA-Z0-9_-]*/art/[a-zA-Z0-9_-]*")
@@ -157,7 +157,7 @@ def get(self, url, file_name=None):
157157

158158
if get_resp.headers.get("content-type"):
159159
rename(file_name, file_name + guess_extension(
160-
get_resp.headers.get("content-type")))
160+
get_resp.headers.get("content-type").split(";")[0]))
161161

162162
return file_name
163163

0 commit comments

Comments
 (0)