refactor: dynamic UA matching, session reuse, score Optional, --output on all commands
- constants.py: sync_chrome_version() aligns UA/sec-ch-ua with impersonate target - auth.py: reuse shared cffi session instead of creating duplicate - filter.py: eliminate double weight building in score_tweet - models.py: Tweet.score → Optional[float] for accurate display - cli.py: add --output to search/likes/user-posts for consistency
This commit is contained in:
@@ -112,7 +112,7 @@ def tweet_from_dict(data: Dict[str, Any]) -> Tweet:
|
||||
lang=str(data.get("lang") or ""),
|
||||
retweeted_by=_optional_str(data.get("retweetedBy")),
|
||||
quoted_tweet=quoted_tweet,
|
||||
score=float(data.get("score") or 0.0),
|
||||
score=float(data["score"]) if data.get("score") is not None else None,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user