summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/directlink.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2021-08-04 02:14:44 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2021-08-04 02:14:44 -0400
commit873d9a628e9412a79bdc64cd962470749de3425b (patch)
tree8cd421ef79a9fa784147fa888543216f0872357b /gallery_dl/extractor/directlink.py
parent32de2b06db501c7de81678bce8e3e0c3e63d340c (diff)
New upstream version 1.18.2.upstream/1.18.2
Diffstat (limited to 'gallery_dl/extractor/directlink.py')
-rw-r--r--gallery_dl/extractor/directlink.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gallery_dl/extractor/directlink.py b/gallery_dl/extractor/directlink.py
index a6346bf..8505b0b 100644
--- a/gallery_dl/extractor/directlink.py
+++ b/gallery_dl/extractor/directlink.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright 2017-2020 Mike Fährmann
+# Copyright 2017-2021 Mike Fährmann
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -59,7 +59,8 @@ class DirectlinkExtractor(Extractor):
data["path"], _, name = data["path"].rpartition("/")
data["filename"], _, ext = name.rpartition(".")
data["extension"] = ext.lower()
- data["_http_headers"] = {"Referer": self.url}
+ data["_http_headers"] = {
+ "Referer": self.url.encode("latin-1", "ignore")}
yield Message.Version, 1
yield Message.Directory, data