[directlink] send Referer headers (closes #536)

pull/552/head
Mike Fährmann 5 years ago
parent 83909ab5d4
commit bf3df3d0b0
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -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))

@ -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

@ -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"

Loading…
Cancel
Save