Skip to content

Commit

Permalink
[MISC] Robust post extraction (#72)
Browse files Browse the repository at this point in the history
* reddit: robust post extraction

* helm: upgrade tag
  • Loading branch information
finaldie authored Apr 14, 2024
1 parent 4b0d4f8 commit fc2aa3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ airflow:
images:
airflow:
repository: finaldie/auto-news
tag: 0.9.7
tag: 0.9.8

useDefaultImageForMigration: true

Expand Down
2 changes: 1 addition & 1 deletion src/reddit_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def _extractSubredditPosts(self, response, data_folder, run_id):
ts = post["data"]["created_utc"]
dt_utc = datetime.fromtimestamp(ts).isoformat()
dt_pdt = utils.convertUTC2PDT_str(dt_utc).isoformat()
author = post["data"]["author"]
author = post["data"].get("author") or post["data"].get("author_fullname") or "unknown_author"
subreddit = post["data"]["subreddit"]
title = post["data"]["title"]
post_long_id = f"{subreddit}_{title}_{author}_{ts}"
Expand Down

0 comments on commit fc2aa3e

Please sign in to comment.