diff options
| author | 2025-01-28 19:12:16 -0500 | |
|---|---|---|
| committer | 2025-01-28 19:12:16 -0500 | |
| commit | 5a7d8217a6edc66e3cf25ca0eee6614a10fa866c (patch) | |
| tree | a941825bf5fcf706f23b49e536edb9a2b26d5b6c /gallery_dl/extractor/lofter.py | |
| parent | e8f1b0d968a07cba884462e10718628394d1bae5 (diff) | |
| parent | a26df18796ff4e506b16bf32fcec9336233b9e2e (diff) | |
Update upstream source from tag 'upstream/1.28.5'
Update to upstream version '1.28.5'
with Debian dir a2e4b8ba663c03c37256ad2b059b382999e473bc
Diffstat (limited to 'gallery_dl/extractor/lofter.py')
| -rw-r--r-- | gallery_dl/extractor/lofter.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gallery_dl/extractor/lofter.py b/gallery_dl/extractor/lofter.py index 412b6b9..b92a6ff 100644 --- a/gallery_dl/extractor/lofter.py +++ b/gallery_dl/extractor/lofter.py @@ -23,6 +23,8 @@ class LofterExtractor(Extractor): def items(self): for post in self.posts(): + if post is None: + continue if "post" in post: post = post["post"] @@ -129,6 +131,9 @@ class LofterAPI(): url, method="POST", params=params, data=data) info = response.json() + if info["meta"]["status"] == 4200: + raise exception.NotFoundError("blog") + if info["meta"]["status"] != 200: self.extractor.log.debug("Server response: %s", info) raise exception.StopExtraction("API request failed") @@ -142,6 +147,9 @@ class LofterAPI(): yield from posts + if data["offset"] < 0: + break + if params["offset"] + len(posts) < data["offset"]: break params["offset"] = data["offset"] |
