[seisoparty] warn about missing DDoS-GUARD cookies
This commit is contained in:
@@ -20,6 +20,8 @@ class SeisopartyExtractor(Extractor):
|
||||
directory_fmt = ("{category}", "{service}", "{username}")
|
||||
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)
|
||||
@@ -28,6 +30,11 @@ 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
|
||||
|
||||
for post in self.posts():
|
||||
files = post.pop("files")
|
||||
yield Message.Directory, post
|
||||
|
||||
Reference in New Issue
Block a user