diff options
| author | 2022-03-15 00:19:57 -0400 | |
|---|---|---|
| committer | 2022-03-15 00:19:57 -0400 | |
| commit | c2e774d3f5a4499b8beb5a12ab46a0099b16b1e7 (patch) | |
| tree | a14107397b5bcb491aa4f4fb3e0feb4582e1879b /gallery_dl/extractor/lolisafe.py | |
| parent | 7900ee4e3692dbd8056c3e47c81bb22eda030b65 (diff) | |
New upstream version 1.21.0.upstream/1.21.0
Diffstat (limited to 'gallery_dl/extractor/lolisafe.py')
| -rw-r--r-- | gallery_dl/extractor/lolisafe.py | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/gallery_dl/extractor/lolisafe.py b/gallery_dl/extractor/lolisafe.py index c63fa51..43377bd 100644 --- a/gallery_dl/extractor/lolisafe.py +++ b/gallery_dl/extractor/lolisafe.py @@ -44,7 +44,7 @@ class LolisafelbumExtractor(LolisafeExtractor): }), # mp4 (#2239) ("https://bunkr.is/a/ptRHaCn2", { - "pattern": r"https://cdn\.bunkr\.is/_-RnHoW69L\.mp4", + "pattern": r"https://media-files\.bunkr\.is/_-RnHoW69L\.mp4", "content": "80e61d1dbc5896ae7ef9a28734c747b28b320471", }), ("https://bunkr.to/a/Lktg9Keq"), @@ -73,9 +73,8 @@ class LolisafelbumExtractor(LolisafeExtractor): data["name"], sep, data["id"] = data["filename"].rpartition("-") if data["extension"] == "mp4": - data["_http_validate"] = self._check_rewrite - else: - data["_http_validate"] = None + url = url.replace( + "//cdn.bunkr.is/", "//media-files.bunkr.is/", 1) yield Message.Url, url, data def fetch_album(self, album_id): @@ -87,13 +86,3 @@ class LolisafelbumExtractor(LolisafeExtractor): "album_name": text.unescape(data["title"]), "count" : data["count"], } - - @staticmethod - def _check_rewrite(response): - if response.history and response.headers.get( - "Content-Type").startswith("text/html"): - # consume content to reuse connection - response.content - # rewrite to download URL - return response.url.replace("/v/", "/d/", 1) - return True |
