Skip to content

Commit

Permalink
feat: attempt to store tweets’ user IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
andylolz committed Jul 11, 2024
1 parent 3ca2430 commit dacf2c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions x_notes/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def load_notes(filepath: str = "output/data/notes.json") -> dict[str, dict[str,
"tweet",
"tweet_id",
"user",
"user_id",
"tweet_created_at",
]
if k in noted_tweet
Expand All @@ -52,6 +53,7 @@ def save_notes(
"tweet",
"tweet_id",
"user",
"user_id",
"tweet_created_at",
]
if k in note
Expand Down
1 change: 1 addition & 0 deletions x_notes/tweets.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ async def fetch_tweets() -> None:
if tweet:
note_update["lang"] = tweet.lang
note_update["user"] = tweet.user.username
note_update["user_id"] = tweet.user.id
note_update["tweet"] = tweet.rawContent
note_update["tweet_created_at"] = tweet.date.isoformat()
else:
Expand Down

0 comments on commit dacf2c6

Please sign in to comment.