[fanbox] yield data for inaccessible posts (#8643)
This commit is contained in:
@@ -66,17 +66,16 @@ class FanboxExtractor(Extractor):
|
|||||||
if fee_max is not None and fee_max < item["feeRequired"]:
|
if fee_max is not None and fee_max < item["feeRequired"]:
|
||||||
self.log.warning("Skipping post %s (feeRequired of %s > %s)",
|
self.log.warning("Skipping post %s (feeRequired of %s > %s)",
|
||||||
item["id"], item["feeRequired"], fee_max)
|
item["id"], item["feeRequired"], fee_max)
|
||||||
continue
|
else:
|
||||||
|
try:
|
||||||
try:
|
url = ("https://api.fanbox.cc/post.info?postId=" +
|
||||||
url = "https://api.fanbox.cc/post.info?postId=" + item["id"]
|
item["id"])
|
||||||
body = self.request_json(url, headers=self.headers)["body"]
|
item = self.request_json(url, headers=self.headers)["body"]
|
||||||
content_body, post = self._extract_post(body)
|
except Exception as exc:
|
||||||
except Exception as exc:
|
self.log.warning("Skipping post %s (%s: %s)",
|
||||||
self.log.warning("Skipping post %s (%s: %s)",
|
item["id"], exc.__class__.__name__, exc)
|
||||||
item["id"], exc.__class__.__name__, exc)
|
|
||||||
continue
|
|
||||||
|
|
||||||
|
content_body, post = self._extract_post(item)
|
||||||
yield Message.Directory, post
|
yield Message.Directory, post
|
||||||
yield from self._get_urls_from_post(content_body, post)
|
yield from self._get_urls_from_post(content_body, post)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user