From bf3df3d0b0c6f0b9de9ae0f548c4d2bf72eb95eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 25 Dec 2019 17:17:07 +0100 Subject: [PATCH] [directlink] send Referer headers (closes #536) --- CHANGELOG.md | 2 ++ gallery_dl/extractor/directlink.py | 2 ++ gallery_dl/version.py | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcd9f582..b611c211 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog +## Unreleased + ## 1.12.1 - 2019-12-22 ### Additions - [4chan] add extractor for entire boards ([#510](https://github.com/mikf/gallery-dl/issues/510)) diff --git a/gallery_dl/extractor/directlink.py b/gallery_dl/extractor/directlink.py index 80db096c..1d17658d 100644 --- a/gallery_dl/extractor/directlink.py +++ b/gallery_dl/extractor/directlink.py @@ -55,9 +55,11 @@ class DirectlinkExtractor(Extractor): for key, value in data.items(): if value: data[key] = text.unquote(value) + data["path"], _, name = data["path"].rpartition("/") data["filename"], _, ext = name.rpartition(".") data["extension"] = ext.lower() + data["_http_headers"] = {"Referer": self.url} yield Message.Version, 1 yield Message.Directory, data diff --git a/gallery_dl/version.py b/gallery_dl/version.py index 2ac7ceb9..62fe6b36 100644 --- a/gallery_dl/version.py +++ b/gallery_dl/version.py @@ -6,4 +6,4 @@ # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. -__version__ = "1.12.1" +__version__ = "1.12.2-dev"