fix: P0 Windows Edge path, add time localization, show --output, cleanup tech debt
- Fix auth.py subprocess script Windows Edge cookie path inconsistency - Add timeutil.py for UTC→local time and relative time conversion - Integrate time localization into formatter.py and serialization.py - Add --output/-o option to show command for saving tweet detail as JSON - Remove constants.py legacy aliases (USER_AGENT, SEC_CH_UA) - Remove client.py backward-compat delegation methods and re-exports - Update test imports to use parser module directly
This commit is contained in:
@@ -6,6 +6,7 @@ import json
|
||||
from typing import Any, Dict, Iterable, List, Optional
|
||||
|
||||
from .models import Author, Metrics, Tweet, TweetMedia, UserProfile
|
||||
from .timeutil import format_local_time
|
||||
|
||||
|
||||
def tweet_to_dict(tweet: Tweet) -> Dict[str, Any]:
|
||||
@@ -29,6 +30,7 @@ def tweet_to_dict(tweet: Tweet) -> Dict[str, Any]:
|
||||
"bookmarks": tweet.metrics.bookmarks,
|
||||
},
|
||||
"createdAt": tweet.created_at,
|
||||
"createdAtLocal": format_local_time(tweet.created_at),
|
||||
"media": [
|
||||
{
|
||||
"type": media.type,
|
||||
|
||||
Reference in New Issue
Block a user