feat: cookie file cache with TTL + user --json

- Cookie cache: save to ~/.cache/twitter-cli/cookies.json (24h TTL)
- On 401/403 auth failure: auto-invalidate cache, re-extract from browser
- Cache uses 0600 permissions for security
- Add --json option to twitter user command for scripting
- Priority: env vars → cache file → browser extraction
This commit is contained in:
jackwener
2026-03-09 21:47:23 +08:00
parent bbe0bc8de3
commit 7fb02ba18c
4 changed files with 86 additions and 10 deletions

2
uv.lock generated
View File

@@ -950,7 +950,7 @@ wheels = [
[[package]]
name = "twitter-cli"
version = "0.4.4"
version = "0.4.6"
source = { editable = "." }
dependencies = [
{ name = "beautifulsoup4" },