automatically set required DDoS-GUARD cookies (#1779)

for kemono.party and seiso.party
This commit is contained in:
Mike Fährmann
2021-08-16 17:40:29 +02:00
parent bd08ee2859
commit bb6a130942
4 changed files with 7 additions and 15 deletions

View File

@@ -21,7 +21,6 @@ class SeisopartyExtractor(Extractor):
filename_fmt = "{id}_{title}_{num:>02}_{filename}.{extension}"
archive_fmt = "{service}_{user}_{id}_{num}"
cookiedomain = ".seiso.party"
_warning = True
def __init__(self, match):
Extractor.__init__(self, match)
@@ -30,10 +29,7 @@ class SeisopartyExtractor(Extractor):
r'href="(https://cdn(?:-\d)?\.seiso\.party/files/[^"]+)').findall
def items(self):
if self._warning:
if not self._check_cookies(("__ddg1", "__ddg2")):
self.log.warning("no DDoS-GUARD cookies set (__ddg1, __ddg2)")
SeisopartyExtractor._warning = False
self._prepare_ddosguard_cookies()
for post in self.posts():
files = post.pop("files")