From 29279f07d4b493f24efde89fb37e3624b9d7897b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 13 Sep 2024 10:31:28 +0200 Subject: [PATCH] [cohost] warn about inaccessible posts (#4483) --- gallery_dl/extractor/cohost.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gallery_dl/extractor/cohost.py b/gallery_dl/extractor/cohost.py index a8821bda..5523d384 100644 --- a/gallery_dl/extractor/cohost.py +++ b/gallery_dl/extractor/cohost.py @@ -31,6 +31,13 @@ class CohostExtractor(Extractor): def items(self): for post in self.posts(): + reason = post.get("limitedVisibilityReason") + if reason and reason != "none": + if reason == "log-in-first": + reason = ("This page's posts are visible only to users " + "who are logged in.") + self.log.warning('%s: "%s"', post["postId"], reason) + files = self._extract_files(post) post["count"] = len(files) post["date"] = text.parse_datetime(