Commit Graph

8 Commits

Author SHA1 Message Date
synapz-org
b74cc323d1 feat: add CLI main module with Click integration
Implemented the CLI entry point using Click framework. The CLI:
- Accepts Space URL as an argument
- Supports --cookies and --output options
- Validates URLs using the validator module
- Downloads Spaces using the downloader module
- Provides clear success and error messages
- Uses proper exit codes (0=success, 1=validation error, 2=download error)

Test uses Click's CliRunner to test CLI without running actual downloads.
Mocks validate_space_url and download_space functions for isolated testing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 09:47:35 -04:00
synapz-org
5eec3129bc feat: add error handling to downloader
Added DownloadError exception class that is raised when yt-dlp fails.
The download_space function now wraps yt-dlp calls in a try-except block
to catch any exceptions and raise a custom DownloadError with a clear message.

Test added to verify that DownloadError is raised when yt-dlp fails.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 09:45:09 -04:00
synapz-org
73775c122b refactor: improve downloader robustness and test coverage
- Add test for cookies_file parameter verification
- Add test for yt-dlp configuration (format, outtmpl, postprocessors)
- Use validator module for robust space_id extraction
- Replace fragile URL splitting with validate_space_url()
- Handles trailing slashes and query parameters correctly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 09:43:26 -04:00
synapz-org
0a6a2ffd71 feat: add downloader module with yt-dlp integration
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 09:40:11 -04:00
synapz-org
21b3dfd8b2 feat: add validator error cases and twitter.com support
Added comprehensive test coverage for URL validation:
- Test for invalid URL formats (missing /i/, missing space ID, malformed URLs)
- Test for twitter.com domain support (in addition to x.com)

Updated validator implementation:
- Extended regex pattern to accept both x.com and twitter.com domains
- Updated group capture index to account for domain alternation

All validator tests passing (3/3).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 09:37:08 -04:00
synapz-org
52ee05e009 feat: add URL validator for X Space URLs
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 09:33:47 -04:00
synapz-org
07814e10b4 feat: add project setup and dependencies
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 09:30:07 -04:00
synapz-org
bcf83b51ea Add design document for X Space downloader
- Python CLI tool using yt-dlp as core engine
- Cookie-based authentication
- MP3 output format
- Recordings only (not live Spaces)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 09:25:17 -04:00