Skip to content

Commit 65c4f00

Browse files
committed
[imagehosts] provide 'post_url' metadata (#6582)
#6582 (comment)
1 parent 359681a commit 65c4f00

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

gallery_dl/extractor/imagehosts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ def items(self):
6666
else:
6767
data = text.nameext_from_url(url)
6868
data["token"] = self.token
69+
data["post_url"] = self.page_url
6970
data.update(self.metadata(page))
7071

7172
if self._https and url.startswith("http:"):

test/results/pixhost.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@
1313
"#category": ("imagehost", "pixhost", "image"),
1414
"#class" : imagehosts.PixhostImageExtractor,
1515
"#sha1_url" : "4e5470dcf6513944773044d40d883221bbc46cff",
16-
"#sha1_metadata": "3bad6d59db42a5ebbd7842c2307e1c3ebd35e6b0",
1716
"#sha1_content" : "0c8768055e4e20e7c7259608b67799171b691140",
17+
18+
"filename" : "130327671_test-",
19+
"extension": "png",
20+
"directory": "190",
21+
"token" : "130327671",
22+
"post_url" : "https://pixhost.to/show/190/130327671_test-.png",
1823
},
1924

2025
{

test/results/postimg.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
"#category": ("imagehost", "postimg", "image"),
1414
"#class" : imagehosts.PostimgImageExtractor,
1515
"#results" : "https://i.postimg.cc/PhJZt1Rw/test-tesuto.png?dl=1",
16+
17+
"filename" : "test-テスト-\"&>",
18+
"extension": "png",
19+
"token" : "Wtn2b3hC",
20+
"post_url" : "https://postimg.cc/Wtn2b3hC",
1621
},
1722

1823
{
@@ -34,9 +39,10 @@
3439
"#results" : "https://i.postimg.cc/PhJZt1Rw/test-tesuto.png?dl=1",
3540
"#sha1_content" : "cfaa8def53ed1a575e0c665c9d6d8cf2aac7a0ee",
3641

37-
"extension": "png",
3842
"filename" : "test-テスト-\"&>",
43+
"extension": "png",
3944
"token" : "Wtn2b3hC",
45+
"post_url" : "https://postimg.cc/Wtn2b3hC",
4046
},
4147

4248
{

test/results/turboimagehost.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,16 @@
1313
"#category": ("imagehost", "turboimagehost", "image"),
1414
"#class" : imagehosts.TurboimagehostImageExtractor,
1515
"#sha1_url" : "b94de43612318771ced924cb5085976f13b3b90e",
16-
"#sha1_metadata": "704757ca8825f51cec516ec44c1e627c1f2058ca",
1716
"#sha1_content" : (
1817
"f38b54b17cd7462e687b58d83f00fca88b1b105a",
1918
"0c8768055e4e20e7c7259608b67799171b691140",
2019
"961b25d85b5f5bd18cbe3e847ac55925f14d0286"
2120
),
21+
22+
"filename" : "test--",
23+
"extension": "png",
24+
"token" : "39078423",
25+
"post_url" : "https://www.turboimagehost.com/p/39078423/test--.png.html",
2226
},
2327

2428
{

0 commit comments

Comments
 (0)