[cohost] warn about inaccessible posts (#4483)

pull/4791/merge
Mike Fährmann 1 week ago
parent 319116c923
commit 29279f07d4
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -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(

Loading…
Cancel
Save