Bug fixes (P0): - _extract_cursor: both branches now check cursorType=='Bottom', preventing Top cursor from corrupting pagination state - _api_get: add retry loop with exponential backoff for HTTP 429 and JSON error code 88 rate limits Improvements (P1): - _deep_get: support int keys for list index access - Extract BEARER_TOKEN/USER_AGENT into constants.py (was duplicated in auth.py and client.py) Code quality (P2): - fetch_likes: add override_base_variables=True to avoid sending latestControlAvailable/requestContext which Likes endpoint rejects - CLI: extract _fetch_and_display() helper to dedup favorite/likes - _get_client(): remove useless try/except that re-raised same error - formatter: remove no-op tweets_to_json wrapper - _as_int/_as_float: filter.py now imports from config.py Polish (P3): - _parse_tweet_result: split into _extract_media + _extract_author - CLI module docstring: add likes command - verify_cookies: increase timeout from 3s to 10s
13 lines
334 B
Python
13 lines
334 B
Python
"""Shared constants for twitter-cli."""
|
|
|
|
BEARER_TOKEN = (
|
|
"AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs"
|
|
"%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA"
|
|
)
|
|
|
|
USER_AGENT = (
|
|
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) "
|
|
"AppleWebKit/537.36 (KHTML, like Gecko) "
|
|
"Chrome/131.0.0.0 Safari/537.36"
|
|
)
|