-
Notifications
You must be signed in to change notification settings - Fork 0
Add 3-part retry with proxy rotation #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Generate comprehensive codebase map documenting architecture, module purposes, data flows, and navigation guides. Add CLAUDE.md for quick reference when working with Claude Code.
Restructure video extraction into 3 separate retry parts, each with its own configurable retry count and instant proxy rotation on failure: - Part 1: URL resolution (short URLs to full URLs) - Part 2: Video info extraction (metadata and video data) - Part 3: Download (video/images/music) Key changes: - Add ProxySession class to manage proxy state per request flow - Add TikTokInvalidLinkError for Part 1 failures - Add new env vars: URL_RESOLVE_MAX_RETRIES, VIDEO_INFO_MAX_RETRIES, DOWNLOAD_MAX_RETRIES (all default to 3) - Refactor video() and music() to use internal 3-part retry - Add download_slideshow_images() with individual image retry - Update handlers to use simplified video()/music() API - Add TikTok status code handling (10204=deleted, 10222=private) The same proxy persists across all parts unless a retry is triggered, at which point it rotates to the next proxy for instant retry.
Document the new ProxySession class and 3-part retry architecture in CODEBASE_MAP.md, including updated diagrams, method references, and environment variable configuration.
- Remove unused _extract_raw_data_sync method (~207 lines of dead code) - Move config import to module level in client.py (removes 7 inline imports) - Add error handling for slideshow fallback path when all images fail
PR Reviewer Guide 🔍(Review updated until commit 50661ad)Here are some key observations to aid the review process:
|
|
PR Description updated to latest commit (50661ad) |
|
/describe |
|
/review |
|
PR Description updated to latest commit (50661ad) |
|
Persistent review updated to latest commit 50661ad |
Replace old RETRY_MAX_ATTEMPTS and RETRY_REQUEST_TIMEOUT with granular retry configuration for each part of the extraction flow: - URL_RESOLVE_MAX_RETRIES (Part 1) - VIDEO_INFO_MAX_RETRIES (Part 2) - DOWNLOAD_MAX_RETRIES (Part 3)
PR Type
Enhancement, Bug fix
Description
Implement 3-part retry strategy with proxy rotation
Add ProxySession class for per-request proxy state management
Refactor video/music extraction with separate retry logic per stage
Add TikTokInvalidLinkError for URL resolution failures
Remove dead code and improve logging configuration
Diagram Walkthrough
File Walkthrough
2 files
Add retry and logging configurationUpdate logging configuration9 files
Simplify to use built-in retrySimplify to use built-in retrySimplify to use built-in retryAdd slideshow retry with error handlingExport TikTokInvalidLinkErrorImplement 3-part retry with ProxySessionAdd TikTokInvalidLinkErrorAdd proxy session to VideoInfoAdd proxy auth encoding4 files
Add LOG_LEVEL configurationAdd Claude Code guidanceAdd symlink to AGENTS.mdAdd comprehensive codebase documentation