mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-25 12:12:34 +01:00
[directlink] send Referer headers (closes #536)
This commit is contained in:
parent
83909ab5d4
commit
bf3df3d0b0
@ -1,5 +1,7 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
## 1.12.1 - 2019-12-22
|
## 1.12.1 - 2019-12-22
|
||||||
### Additions
|
### Additions
|
||||||
- [4chan] add extractor for entire boards ([#510](https://github.com/mikf/gallery-dl/issues/510))
|
- [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():
|
for key, value in data.items():
|
||||||
if value:
|
if value:
|
||||||
data[key] = text.unquote(value)
|
data[key] = text.unquote(value)
|
||||||
|
|
||||||
data["path"], _, name = data["path"].rpartition("/")
|
data["path"], _, name = data["path"].rpartition("/")
|
||||||
data["filename"], _, ext = name.rpartition(".")
|
data["filename"], _, ext = name.rpartition(".")
|
||||||
data["extension"] = ext.lower()
|
data["extension"] = ext.lower()
|
||||||
|
data["_http_headers"] = {"Referer": self.url}
|
||||||
|
|
||||||
yield Message.Version, 1
|
yield Message.Version, 1
|
||||||
yield Message.Directory, data
|
yield Message.Directory, data
|
||||||
|
@ -6,4 +6,4 @@
|
|||||||
# it under the terms of the GNU General Public License version 2 as
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
# published by the Free Software Foundation.
|
# published by the Free Software Foundation.
|
||||||
|
|
||||||
__version__ = "1.12.1"
|
__version__ = "1.12.2-dev"
|
||||||
|
Loading…
Reference in New Issue
Block a user