mirror of
https://github.com/Glitchy-Sheep/boosty-downloader.git
synced 2026-10-14 21:33:23 +00:00
[PR #189] [MERGED] [downloader] Give --post-url the same retries and refresh as the full run #188
Labels
No labels
api-drift
bug
ci
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Glitchy-Sheep/boosty-downloader#188
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/189
Author: @Glitchy-Sheep
Created: 9/14/2026
Status: ✅ Merged
Merged: 9/14/2026
Merged by: @Glitchy-Sheep
Base:
main← Head:fix/post-url-through-retrier📝 Commits (4)
d6e27e4[cli] Parse --post-url up front and reject a post of another creatorc8d8dd5[downloader] Run --post-url through the post retrier1935f98[downloader] Retry 429 answers and describe the download flow as it isa2abe2d[tests] Read CLI error text without terminal colors in the smoke tests📊 Changes
11 files changed (+399 additions, -223 deletions)
View changed files
📝
CHANGELOG.md(+7 -0)📝
README.md(+5 -2)➕
boosty_downloader/application/use_cases/download_post_by_id.py(+115 -0)➖
boosty_downloader/application/use_cases/download_specific_post.py(+0 -151)📝
boosty_downloader/cli/commands/download.py(+51 -29)📝
boosty_downloader/cli/composition_root.py(+7 -0)➕
boosty_downloader/infrastructure/boosty_api/utils/post_url.py(+41 -0)📝
docs/concepts/boosty/download-flow.md(+25 -15)➕
test/unit/boosty_api/post_url_test.py(+47 -0)📝
test/unit/cli/cli_smoke_test.py(+25 -2)📝
test/unit/use_cases/download_post_by_id_test.py(+76 -24)📄 Description
📝 Summary
Audit stage 4, part 3 of 3:
--post-urlgets the protection the full run already had, the post link is checked before anything runs, and the transport retries 429.🔧 What changes
Fixed
download --post-urlwent around the post retrier: one attempt, no refresh of expired signed links, no containment of unexpected errors, no statistics block. It now runs throughPostDownloadRetrierlike every post of a full run: 5 attempts with growing pauses, one re-fetch of the post when a link dies mid-way, a skip with a clear message on an unexpected error. A failed download still exits with 1.download A --post-url https://boosty.to/B/posts/<id>asked the API for B's post and saved it under A's folder, cache and failure-log URL. The link is now parsed up front with yarl: a post of another creator is a usage error with a hint to run the command with that creator's name, and a link that is not a post page is rejected with the expected shape. Nothing is read or requested before that check.DownloadPostByIdUseCase: the command hands it the id, and the API call, the folder, the cache and the log all use the same creator.Changed
📚 Docs
docs/concepts/boosty/download-flow.mdshows the retrier andPostMediaDownloaderin the pipeline, has a "When a piece fails" section, and no longer claims that expired links end the run.--post-url.🧪 Tests
post_url_test: four link shapes users paste (plain, trailing slash, query, www plus fragment) and six rejections.download_post_by_id_test: a dead link is retried and becomes a failed outcome withposts_failedcounted; a 400 mid-way fetches the post again and the download succeeds; a locked post counts asposts_locked; cancellation still propagates.task cigreen locally: ruff, pyright strict, import-linter, 268 tests + e2e.--post-urlon a post with three dead attachments shows the attempts, the skip, the summary and the statistics block (8 images saved on the first attempt), exits with 1, and a rerun downloads nothing new.This closes audit stage 4.
✅ Checklist
--helpand README if neededdocs/if the download flow or dev process changed## Unreleasedin CHANGELOG.md (or theci/skip-changeloglabel if not user-facing)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.