From 1c79044433456b43e26ce8362380d2c6e2ed62bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sun, 27 Feb 2022 16:12:28 +0100 Subject: [PATCH] [imagebam] set 'nsfw_inter' cookie (fixes #2334) --- gallery_dl/extractor/imagebam.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/gallery_dl/extractor/imagebam.py b/gallery_dl/extractor/imagebam.py index 93708407b4..2ab8245ae9 100644 --- a/gallery_dl/extractor/imagebam.py +++ b/gallery_dl/extractor/imagebam.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2014-2021 Mike Fährmann +# Copyright 2014-2022 Mike Fährmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as @@ -16,27 +16,16 @@ class ImagebamExtractor(Extractor): """Base class for imagebam extractors""" category = "imagebam" root = "https://www.imagebam.com" - cookies = None def __init__(self, match): Extractor.__init__(self, match) self.key = match.group(1) - if self.cookies: - self.session.cookies = self.cookies + self.session.cookies.set("nsfw_inter", "1", domain="www.imagebam.com") def get_image_data(self, data): page_url = "{}/image/{}".format(self.root, data["image_key"]) page = self.request(page_url).text image_url, pos = text.extract(page, '