diff --git a/gallery_dl/extractor/imagehosts.py b/gallery_dl/extractor/imagehosts.py index 0dae9ee1..101e7d15 100644 --- a/gallery_dl/extractor/imagehosts.py +++ b/gallery_dl/extractor/imagehosts.py @@ -66,6 +66,7 @@ class ImagehostImageExtractor(Extractor): else: data = text.nameext_from_url(url) data["token"] = self.token + data["post_url"] = self.page_url data.update(self.metadata(page)) if self._https and url.startswith("http:"): diff --git a/test/results/pixhost.py b/test/results/pixhost.py index 82fbea98..c1461b4e 100644 --- a/test/results/pixhost.py +++ b/test/results/pixhost.py @@ -13,8 +13,13 @@ __tests__ = ( "#category": ("imagehost", "pixhost", "image"), "#class" : imagehosts.PixhostImageExtractor, "#sha1_url" : "4e5470dcf6513944773044d40d883221bbc46cff", - "#sha1_metadata": "3bad6d59db42a5ebbd7842c2307e1c3ebd35e6b0", "#sha1_content" : "0c8768055e4e20e7c7259608b67799171b691140", + + "filename" : "130327671_test-", + "extension": "png", + "directory": "190", + "token" : "130327671", + "post_url" : "https://pixhost.to/show/190/130327671_test-.png", }, { diff --git a/test/results/postimg.py b/test/results/postimg.py index cacfa572..6ab3d5f2 100644 --- a/test/results/postimg.py +++ b/test/results/postimg.py @@ -13,6 +13,11 @@ __tests__ = ( "#category": ("imagehost", "postimg", "image"), "#class" : imagehosts.PostimgImageExtractor, "#results" : "https://i.postimg.cc/PhJZt1Rw/test-tesuto.png?dl=1", + + "filename" : "test-テスト-\"&>", + "extension": "png", + "token" : "Wtn2b3hC", + "post_url" : "https://postimg.cc/Wtn2b3hC", }, { @@ -34,9 +39,10 @@ __tests__ = ( "#results" : "https://i.postimg.cc/PhJZt1Rw/test-tesuto.png?dl=1", "#sha1_content" : "cfaa8def53ed1a575e0c665c9d6d8cf2aac7a0ee", - "extension": "png", "filename" : "test-テスト-\"&>", + "extension": "png", "token" : "Wtn2b3hC", + "post_url" : "https://postimg.cc/Wtn2b3hC", }, { diff --git a/test/results/turboimagehost.py b/test/results/turboimagehost.py index ff3b6723..af9f324a 100644 --- a/test/results/turboimagehost.py +++ b/test/results/turboimagehost.py @@ -13,12 +13,16 @@ __tests__ = ( "#category": ("imagehost", "turboimagehost", "image"), "#class" : imagehosts.TurboimagehostImageExtractor, "#sha1_url" : "b94de43612318771ced924cb5085976f13b3b90e", - "#sha1_metadata": "704757ca8825f51cec516ec44c1e627c1f2058ca", "#sha1_content" : ( "f38b54b17cd7462e687b58d83f00fca88b1b105a", "0c8768055e4e20e7c7259608b67799171b691140", "961b25d85b5f5bd18cbe3e847ac55925f14d0286" ), + + "filename" : "test--", + "extension": "png", + "token" : "39078423", + "post_url" : "https://www.turboimagehost.com/p/39078423/test--.png.html", }, {