From c148e200a41b46d74fff86a6f7c57f6280edc501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 14 Oct 2024 16:28:24 +0200 Subject: [PATCH] [bunkr] send proper Referer headers for file downloads (#6319) --- gallery_dl/extractor/bunkr.py | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/gallery_dl/extractor/bunkr.py b/gallery_dl/extractor/bunkr.py index 2dcc9000..5901e678 100644 --- a/gallery_dl/extractor/bunkr.py +++ b/gallery_dl/extractor/bunkr.py @@ -64,30 +64,32 @@ class BunkrAlbumExtractor(LolisafeAlbumExtractor): "album_name" : text.unescape(info[0]), "album_size" : size[1:-1], "count" : len(urls), - "_http_validate": self._validate, } def _extract_files(self, urls): for url in urls: try: - url = self._extract_file(text.unescape(url)) + yield self._extract_file(text.unescape(url)) except Exception as exc: self.log.error("%s: %s", exc.__class__.__name__, exc) - continue - yield {"file": text.unescape(url)} - def _extract_file(self, url): - page = self.request(url).text - url = (text.extr(page, '